Skip to content

Handle keyboard backlight toggle keys.


Pressing the XF86XK_KbdLightOnOff (kbdillumtoggle) will cycle through the available brightness levels (it will increase brightness up to the maximum and then go back to minimum).

If the keyboard has only two states, this behaves as a simple toggle.

The reason for cycling is that it is unlikely that a laptop will have all three buttins for brightness up, down and toggle. If the machine has only a toggle button and more than one brighness level, a simple on/off (or min/max) toggle will not allow to use the intermediate levels.

addresses #222 (closed)


  1. I developed this on top of 4.18 and then cherry-picked onto 4.19. I don't know how to build 4.19 without messing up my desktop.
  2. I see 4.19 introduces Wayland support. Where are the key captures for wayland defined?
Edited by Juan I Carrano

Merge request reports