-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fix UK Hash and Backslash mixup #27
Fix UK Hash and Backslash mixup #27
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor doc request, otherwise looks good to me :) Also needs CHANGELOG entry
Rather than explain why HashTilde and Backslash are swapped on a UK keyboard, I got a bit carried away and fundamentally reworked how we name Key Codes. |
Now matches https://kbdlayout.info/kbduk/virtualkeys. Also fixes decode of Print Screen and Pause/Break. * BackTick is now Oem8 * Minus is now OemMinus * Equals is now OemPlus * BracketSquareLeft is now Oem4 * BracketSquareRight is now Oem6 * BackSlash is now Oem7 * SemiColon is now Oem1 * Quote is now Oem3 * Enter is now Return * Comma is now OemComma * Fullstop is now OemPeriod * Slash is now Oem2 * NumpadSlash is now NumpadDivide * NumpadStar is now NumpadMultiply * NumpadMinus is now NumpadSubtract * NumpadPlus is now NumpadAdd * ShiftLeft/Right is now LShift/RShift * ControlLeft/Right is now LControl/RControl * AltLeft/Right is now LAlt/RAltGr * RCtrl2 is now a thing (turns NumLock into Pause) * RAlt2 is now a thing (sent as part of Print Screen) * Cleaned up the test cases The KeyCode enum now fits in a `u8`.
233edda
to
fafe0ec
Compare
It makes KeyCodes non-FFI-safe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the changes, but the Oem
codes are a bit opaque to me. Which makes sense if every OEM uses them differently.
In any case, I like the changes here. I haven't thoroughly reviewed every key mapping, but I imagine it's easy for us to fix issues as they arise.
Closes #25