You enabled the sticky keys feature! Search the manual for "sticky keys". If you hold a modifier (ie the right shift), Program, and F6, the particular shift you held becomes intentionally "sticky", allowing you for example to type capital letters while pushing only 1 key at a time. Making Shift sticky is not that useful when you have Caps Lock, but the feature can be more useful for the Control keys, so you can do things like Control-C with a single finger. Some operating systems have this accessibility feature as well, I think on windows it's turned on if you press Shift 5 times in a row or something.
Anyway, just repeat the same modifier+Program+F6 combo to undo it.