The keyCodes violate pretty much any API available, with random offsets. Here's a list of what I've found out so far:
Violations to ASCII charset:
F1 - F12 are offseted incorrectly, so F1 to F3 work correctly (with incorrect keyCodes 58-60)
F4 has the keyCode 187 (= or +) which doesn't make any sense.
F5 and upwards are identical keyCodes as a and later letters on the keyboard, so they do conflict with the ASCII range and therefore cannot be used in their current state.
9 or shift-9 will lead to keycode 20 (capslock) which is incorrect and should be 57.
page-up will lead to keycode 75 ("k") which is incorrect and should be 33.
page-down will lead to keycode 78 ("n") which is incorrect and should be 34.
pos1 (or begin or home) will lead to keycode 74 ("j") which is incorrect.
end will lead to keycode 77 ("m") which is incorrect and should be 35.
insert (or ins) will lead to keycode 73 ("i") which is incorrect and should be 45.
delete (or entf) will lead to keycode 127 which is incorrect and should be 46.
Additional Notes:
-
The F1-F12 keys normally have the keycodes 112 (F1) to 123 (F12) to not conflict with the ASCII key range.
-
The special characters (0-9 keys on keyboard) are typically in the range of 48 - 57, because of ASCII charset compatibility. In nidium, this is incorrect, too.
-
Other special characters ([];'\,./ keys) typically are in the range of 186-192 and 219-222, in nidium those are totally incorrect (and seemingly randomly), too. Violations from previously mentioned numbers to wrong ASCII charset and others is the case in nidium.
Overall, there's plenty of bugs in the keycode API and special characters (like shift-1, or [ etc.) have totally different keycodes than the specs have. As those are too complicated and too exhausting to list, I am just posting my temporary working-except-above-bugs key mappings file here in the lychee.Input implementation. Take a look in my implementation for the _KEYMAP and _SPECIALMAP constants if direct link to line does not work.
The keyCodes violate pretty much any API available, with random offsets. Here's a list of what I've found out so far:
Violations to ASCII charset:
F1-F12are offseted incorrectly, so F1 to F3 work correctly (with incorrect keyCodes 58-60)F4has the keyCode187(=or+) which doesn't make any sense.F5and upwards are identical keyCodes asaand later letters on the keyboard, so they do conflict with the ASCII range and therefore cannot be used in their current state.9orshift-9will lead to keycode20(capslock) which is incorrect and should be57.page-upwill lead to keycode75("k") which is incorrect and should be33.page-downwill lead to keycode78("n") which is incorrect and should be34.pos1(orbeginorhome) will lead to keycode74("j") which is incorrect.endwill lead to keycode77("m") which is incorrect and should be35.insert(orins) will lead to keycode73("i") which is incorrect and should be45.delete(orentf) will lead to keycode127which is incorrect and should be46.Additional Notes:
The F1-F12 keys normally have the keycodes
112(F1) to123(F12) to not conflict with the ASCII key range.The special characters (0-9 keys on keyboard) are typically in the range of
48-57, because of ASCII charset compatibility. In nidium, this is incorrect, too.Other special characters (
[];'\,./keys) typically are in the range of186-192and219-222, in nidium those are totally incorrect (and seemingly randomly), too. Violations from previously mentioned numbers to wrong ASCII charset and others is the case in nidium.Overall, there's plenty of bugs in the keycode API and special characters (like shift-1, or
[etc.) have totally different keycodes than the specs have. As those are too complicated and too exhausting to list, I am just posting my temporary working-except-above-bugs key mappings file here in the lychee.Input implementation. Take a look in my implementation for the_KEYMAPand_SPECIALMAPconstants if direct link to line does not work.