Several keys with identical key codes in AZERTY
See original GitHub issueFor example the
- <kbd>shift</kbd><kbd>,</kbd> (?) and <kbd>shift</kbd><kbd>:</kbd> (/) both give keycode
191
. - The <kbd>=</kbd> and <kbd>shift</kbd><kbd>=</kbd> (+) both give
187
- The numbers (for which you normally need to press <kbd>shift</kbd>) all show as their keycode without shift, except <kbd>4</kbd>, which shows <kbd>'</kbd>
222
and <kbd>4</kbd>52
when <kbd>shift</kbd> is also pressed - the @# key shows in both cases
192
, a key which on Windows keyboards shows superscript 2 and 3
reference image
Not really sure how this can be resolved since there will be loads of differences per language and different keys with the same keycode.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Several keys with identical key codes in AZERTY #88 - GitHub
working on the product of the company I work for, I can tell you that the ASCII codes for AZERTY are messed up,...
Read more >(Solved) Are the keycodes the same for all keyboards?
It is impossible to have the same keyboard key codes for keys matching a certain symbol on a qwerty keyboard as on an...
Read more >Keyboard Change Cipher - Online QWERTY Shifter/Converter
Tool to simulate a computer keyboard change: typing the keys in position P on a keyboard in the same key in position P...
Read more >Appendix B. Keyboard Key Code Values - O'Reilly
Key Key value Key Key value
Alt 18 F5 116
Arrow Down 40 F6 117
Arrow Left 37 F7 118
Read more >Key code for common characters on international keyboards
If you have a QWERTY-keyboard, you'd get key code 81 when you type q . When you have an AZERTY-keyboard, do you get...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
From what it looks like on the
KeyboardEvent
documentation on MDN, the reason for this and similar issues is the fact that the event.which and the event.code are both deprecated or not suggested for use, the reason for it being that they don’t really support cleanly the current keyboard layout of the user. I think generally using theevent.key
as well as theevent.location
is a better option for this.I think this is less of a failing of this tool and more a failing of the browsers and one that cannot be undone because it’s now a feature websites use.
Additionally, I think that the real improvement would come from adding an
event.location
cell in the table on the bottom. I may do that when I have some time, though I’ve noticed that there are some PRs in here from years ago with little to no explanation as to why they weren’t merged. Is this project still being maintained?Thanks for your explanation on this issue. Looking forward to seeing your PR, whenever you get time. Closing this issue for now.