Done! (And yep, I’m a web developer too)
Gotta say, it’s the last possible result I would have expected though.
First I hit space in Alphanumeric mode, then again in Hiragana mode:
We got the string Process
… Huh? I ran some additional tests and found that e.code
is Space
, and even weirder e.keyCode
is 229
! And every single JavaScript keycode list I can find online stops at 222
.
After researching even further, I found a reference to the “PROCESS KEY” in some of Microsoft’s docs, as well as in this stackoverflow post.
Given that the spacebar in Windows’ IME is used both for generating spaces and for converting your input into the correct format (be that kanji, katakana, or some combination) I guess that key gets its own keycode?
Huh…
And if you're curious here's what Bing (née ChatGPT) had to say on the subject.
Here is its primary reference, fwiw.