Is it safe to use Key_BacklightDown and Key_BacklightUp?

(Shriramana Sharma) #1

Just like volume increase/decrease I was looking for a key name to map to increase LCD screen brightness and found this under key_defs.h: Key_BacklightUp and Key_BacklightDown. I wonder why this is not under the other “regular” headers but in this more low level file. So my question:

  1. Is it safe to use Key_BacklightDown and Key_BacklightUp in a keymap?
  2. Would it work on desktop LCD screens or only laptop? (Would test this myself if I were sure of answer to above question.)

(Gergely Nagy) #2

Because backlight control is not part of the HID spec, and therefore these are non-standard codes. They may or may not work. It’s not unsafe, as in, it won’t destroy neither your screen or your keyboard. But it may not do anything. Or it might do something completely unrelated to screen backlight adjustment.

(Neal Harris) #3

I’m also looking for a way to map screen brightness to something. I’m on macOS. Key_Backlight* seems to not do anything for me.

(Shriramana Sharma) #4

The keys didn’t work for me so I removed them from my keymap. Possibly they might work with laptops, I haven’t checked.

(Keith Simmons) #5

This could probably be achieved with a focos plugin…

Some questions on internal key definitions/flags