On Fri, May 13, 2022 at 01:26:34AM +0000, Emmanuel Dreyfus wrote: > I am also a bit puzzled that in our historical code, ANSI ADB > scancode 42, which is supposed to be backslash (the key is between > backspace and return), is converted into USB scancode 50, which > is non US hash. I did not change it, but here again, input from > someone that has access to that keyboard would help.
I committed the code with a comment about that, thank for Michael van Elst for making it clear: USB scancodes 49 and 50 have the same translation in most encodings. Exceptions are pt and hu (and uk for altgr). I retained the wrong but usual value. The JIS case is more troublesome: ADB scancode 93 used to be emulated as USB scan code 100, which in backslash/bar in our jp encoding. The change is supposed to turn it into USB scancode 137, which should be the Yen but is backslash/bar in jp encoding. At least it does not change. ADB scancode 94 used to be emulated as USB scan code 45, which is minus/equal in our jp encoding. The change is supposed to turn it into USB scan code 135, which should be RO but is backslash/underscore in jp encoding. I disabled the autoconfiguration to JIS layout until someone can test it. One need to sysctl -w machdep.adbkbd0.emulate_usb=3 in order to enable it. Feecback welcome. -- Emmanuel Dreyfus m...@netbsd.org