-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report accurate state of * lock keys #23
Comments
Taking a poke at this tonight to see what it will take. The Windows piece looks easy. On OSX, caps lock is the only relevant "lock" as num/scroll don't actually have corresponding keyboard states. The edit: |
Incidentally, investigating this, I've discovered that the current code for OSX doesn't actually toggle the capslock state - it just functions like a shift modifier. A quirk of the API, there's probably another way to actually toggle the state for the device. |
Aha. Carbon.GetCurrentKeyModifiers() will do the trick on OSX. |
Opened PR #263 to track this work. I have Windows and OSX drafted, and I'm spinning up a Linux VM to test the snippets I've found for Linux. |
I was not able to get the |
Caps lock, num lock, scroll lock are all toggle modifiers, so if their state is unexpected at the start of the program it'll never be fixed. There should be a way to poll their actual status.
This may be expanded to include other modifiers, so the library starts more ready.
This may require update the functions that handle modifier keys, to take into account 'toggle' keys too.
The text was updated successfully, but these errors were encountered: