|
|
Subscribe / Log in / New account

XKB ?

XKB ?

Posted May 6, 2020 22:26 UTC (Wed) by whot (subscriber, #50317)
In reply to: XKB ? by mathstuf
Parent article: The Wayland Protocol

libinput does very little with key events, it merely passes them on as-is. Key events are only looked at for meta-functionality like disable-while-typing. There's nothing in libinput to change a key code, it sits below the concept of keyboard layouts.

udev uses the 60-keyboard.hwdb file to remap some keys into the *expected* ones. This too sits below the concept of layouts, it merely exists so that the "volume down" key on your laptop actually sends the volume down evdev code rather than the DeathToAllKittens code which the vendor so graciously programmed the firmware for.

Actual user-specific remapping should be done in the keyboard layout, i.e. with XKB because xmodmap isn't a thing in Wayland.


to post comments

XKB ?

Posted May 6, 2020 23:28 UTC (Wed) by mathstuf (subscriber, #69389) [Link] (2 responses)

Well, found someone who definitely knows more than me at least :) . Thanks for the info.

> Actual user-specific remapping should be done in the keyboard layout

Hmm. I have my caps lock remapped to backspace in udev so that it works on the TTY too. I guess you recommend that being done in xkb instead?

XKB ?

Posted May 7, 2020 0:05 UTC (Thu) by whot (subscriber, #50317) [Link] (1 responses)

changing codes through udev is the software equivalent of changing the physical wiring of the key. it does give you the result you want but its not necessarily what the keyboard manufacturer will recommend as a generically applicable solution.

XKB ?

Posted May 7, 2020 2:34 UTC (Thu) by mathstuf (subscriber, #69389) [Link]

I think that for such a common key like caps lock rewiring, I think I'll assume that it is safer than trying to guess what madness is going on with Fn-modifier scancodes and trying to play around with them. I personally haven't had a need for more exotic remappings, but will keep that in mind when helping out others. Thanks.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds