Disabling the "keep pressed" function of OS X sticky keys
Solution 1:
You can't turn off the "key lock" functionality (last checked on OS X 10.8.2). You can however install KeyRemap4MacBook, which allows you to make modifier keys sticky without this "key lock".
Solution 2:
I believe you have to press it 3 times to release it.
- First Press - Locks the modifier key, and unlocks it after the next key press
- Second Press - Locks the modifier key for multiple other key presses.
- Third Press - Unlocks the modifier.
Exmaple:
Pressing Shift twice while sticky keys is on would be the same result as turning on CAPS lock.
Solution 3:
I've seen this behavior even when "sticky keys" is turned off in system settings, by unchecking the "enable sticky keys" checkbox. I was seeing shift stuck "on" only for OS actions (not for normal typing) after coming back from a lock screen.
To resolve this, I turned sticky keys on (Mac Settings) and then toggled them off again using the shortcuts above.