Hello, On Sun, Oct 11, 2020 at 01:48:34PM +0000, Michael van Elst wrote: > tlaro...@polynum.com writes: > > >My keyboard is attached via usb and I set wscons with the 'fr' encoding. > > >Specifically, the asterisk and mu are not available (giving backslash > >and pipe instead) while in ukbd_keydesc_fr they are mapped to position > >50 (and backslash and pipe are not mapped in the fr patch while they > >are not at the same place as in a qwerty US keyboard). > > >How are defined the positions regarding the keyboard keys map? Or where > >can I find the physical association between the KC(n) n value and the > >keys? > > USB scancodes are defined in the USB specification as "usage ids". > > https://usb.org/sites/default/files/hut1_2.pdf > > The position of a key isn't described as coordinates or graphical layout > but as equivalent to the symbol on a (mostly) US keyboard. The USB > specification defines many more keys than available on a standard > keyboard. > > The asterisk/mu key on a regular french keyboard is equivalent to > "Keyboard Non-US # and '" with usage id 50. > > The ukbd driver regularly uses the hidkbd_keydesc_fr map, which assigns > symbols KS_asterisk and KS_mu to usage id 50. So that's fine. > > > But the "Non-US" says that on a regular US keyboard there is no key with > usage id 50. Some keyboards have an additional key above the enter key, which > is "Keyboard \ and |" with usage id 49. It is possible that some US keyboards > even have this in the same position as "Keyboard Non-US # and '" on Non-US > keyboards but send usage id 49 instead of usage id 50. > > When you load the french keymap, there is no special handling for > usage id 49 and you get the US keymap symbols. You can override the > mapping for usage id 49 for a better result with wsconsctl (also > in wscons.conf). E.g. > > wsconsctl -k -w map+="keycode 49 = asterisk mu"
Thank you very much! Very informative and problem solved! Best, -- Thierry Laronde <tlaronde +AT+ polynum +dot+ com> http://www.kergis.com/ http://www.sbfa.fr/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C