On Wed, Aug 03, 2022 at 09:10:01AM +0100, Laurence Tratt wrote: [Framework laptop keyboard encoding crashing] > I did a bit more digging and I've confused myself considerably, possibly > because I don't know how wscons works. If I boot the machine without the > external keyboard attached, stay in the console (i.e. outside X), and then > plug in the external keyboard causes the laptop keyboard behaves bizarrely: > for example "1" and "a" are inverted (i.e. I press "1" and "a" is > displayed). After I unplug the external keyboard, I seem to get a new (more > bizarre) map in the console where "a" is some sort of control code.
I've been poking around a bit more trying to understand what's going on, and I have some more information -- but nothing that I'd say is exactly definitive. Although I didn't realise it (since it was the first thing I did in the installer) /etc/kbdtype is set: $ cat /etc/kbdtype uk And indeed, the first thing after the kernel boots and userland starts doing its thing says: kbd: keyboard mapping set to uk Provided I don't have an external keyboard plugged in, then on the console the laptop keyboard really does reflect the UK layout (including things like the £ key), but X does not reflect that. However if I later try to set uk encoding with kbd (as /etc/rc does with /etc/kbdtype) it doesn't work: $ doas kbd uk kbd: WSKBDIO_SETENCODING /dev/wskbd0: Bad address I'm unsure how the call to kbd from /etc/rc can work but not subsequently if I issue it manually. The final piece of information I've dug out is that (even with Miod's patch), kbd -l causes a uvm_fault panic in wskbd_displayioctl_sc. I think this is just the same underlying bug manifesting in a different way Laurie