3 ms·
It appears as though, for the keyboard shortcuts, they are matching on the "key", as in the actual letter, instead of the "code", which is more accurate regardi
by EduardoBautista 3y ago
It appears as though, for the keyboard shortcuts, they are matching on the "key", as in the actual letter, instead of the "code", which is more accurate regarding the actual position of the key.
Just a minor annoyance for alternative keyboard layout users. Cool game, though!
- jtokoph 3y agoThis is something I never thought about. So key codes are based on the physical location of the key on a standard layout/qwerty, and changing your layout will cause the key value to change but not the code?
- an_ko 3y agoYes, approximately. In X11 at least, the hardware codes are called keycodes, and the human readable names are called keysyms. Example of the XkbKeycodeToKeysym function in use: https://github.com/anko/xkbcat/blob/8abc3402cb679027a3bd03135a44c4884e5eccf6/xkbcat.c#L126 https://github.com/anko/xkbcat/blob/8abc3402cb679027a3bd0313... Keysyms don't necessarily strictly match "key location"; keyboards are allowed to output whatever codes they want for whatever key they want (see e.g. QMK firmware; often used in custom keyboards to do complex conditional key remapping), but they're in practice relatively consistent between common keys on most keyboards, and consistent on the same keyboard even if you switch keyboard layouts in software, unless you have some custom keyboard firmware which functionality is stateful.
- deleted 3y ago[deleted]