evremap
evremap copied to clipboard
Remapping KEY_RFKILL doesn't seem to work
I'm trying to disable my airplane mode key on my keyboard, and remap it to the right arrow key. I have tried:
[[remap]]
input = ["KEY_RFKILL"]
output = ["KEY_RIGHT"]
and
[[dual_role]]
input = "KEY_RFKILL"
hold = ["KEY_RIGHT"]
tap = ["KEY_RIGHT"]
Neither one works, but other keys are able to be remapped just fine. According to evremap list-keys
, this should be a valid remapping.
Running rfkill list
indicates that the airplane mode key causes the wifi to only be soft blocked, so it should be able to be remapped. When I run xev
, the airplane mode key corresponds to XF86RFKILL (keycode 255). If I do something like xmodmap -e "keycode 255 = Right"
, the key still turns off and on my wifi, while also functioning as a right arrow key, which is not what I want. My OS is Garuda Linux with Qtile, which is Arch-based. Any help would be appreciated.
I don't know much about rfkill, but reading https://lwn.net/Articles/677839/ suggests that the rfkill kernel module registers an event handler at a very low level: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/rfkill/input.c?h=v4.4#n311
I don't think any evdev based remapping will be able to prevent that handler from seeing the original event type.