- From: Masayuki Nakano <notifications@github.com>
- Date: Mon, 26 Aug 2024 21:50:11 -0700
- To: w3c/uievents <uievents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/uievents/issues/377/2311566062@github.com>
First of all, `.keyCode` values cannot be changed on the browser side because the values are just arbitrary values, i.e., do not have meaning. Therefore, web apps handle `.keyCode` values with checking UA etc. So, even if all browsers start using exactly same rules to map `.keyCode` values, existing web apps using `.keyCode` values will be broken. So, if `.key` and `.code` are not enough, there should be new API. In my experience at implementing the shortcut key handling rules of Firefox, completely compatible behavior between browsers and/or platforms may be impossible. Especially when `Shift` key is required, there are some open bugs in Firefox with some keyboard layouts which map punctuation to numeric keys. E.g., `Ctrl + Shift + 1` may be conflict with `Ctrl + !` if `!` is mapped to `Digit1` key. Additionally, some keyboard layout users use 2 keyboard layouts, one is ASCII capable and the other is not so. Then, even if the ASCII capable keyboard layout is not selected, the user wants to work shortcut keys as the ASCII capable keyboard layout is selected. So, this additional information requires to store in `keydown` events. Similarly, some keyboard layout may switch ASCII character mapping when it works with some modifiers. E.g., a keyboard layout may be Dvorak layout, but QWERTY if `Ctrl` or something is pressed. This is also fixable with the above approach. Finally, using punctuation with `Shift` and/or `AltGr` for shortcut may make specific keyboard layout users inaccessible. For avoiding this issue completely, it might be better to make new API work only when the key combination matches only with `[a-z0-9 ]`. -- Reply to this email directly or view it on GitHub: https://github.com/w3c/uievents/issues/377#issuecomment-2311566062 You are receiving this because you are subscribed to this thread. Message ID: <w3c/uievents/issues/377/2311566062@github.com>
Received on Tuesday, 27 August 2024 04:50:15 UTC