Re: [w3c/uievents] "keyCode" is the only way to work with KeyboardEvents now (#267)

Unfortunately `keyCode` doesn't always work. According to [keyCode spec](https://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0182/keyCode-spec.html),
> If an Input Method Editor is processing key input and the event is keydown, return 229.

Example: On the "ABC" layout, Chrome on Mac emits keyCode 229 for Option-N (combining tilde) when the cursor is inside a text input field. In any other place, it emits keyCode 78 (N).
(To make matters even worse, Cmd-Alt-N emits keyCode 192 - which is the key code for a regular tilde (as well as backtick, but that just goes to show how jagged the landscape is.)). It's funny that in 2023, keyboard shortcuts on the web are an unsolved problem.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/267#issuecomment-1512815803
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/uievents/issues/267/1512815803@github.com>

Received on Tuesday, 18 April 2023 10:14:49 UTC