Extra keycodes
Hi,
Several laptops have keys that are intended to show battery status. In order to present a consistent view to userspace, it would be nice to have a standard keycode to map them to. linux/input.h doesn't currently provide anything appropriate. What's the correct way of allocating another keycode?
Signature · 1 line
Matthew Garrett | [email protected]
Quoted 8 lines · Matthew Garrett
Hi,
Several laptops have keys that are intended to show battery status. In order to present a consistent view to userspace, it would be nice to have a standard keycode to map them to.
linux/input.hdoesn't currently provide anything appropriate. What's the correct way of allocating another keycode?
Just post a patch adding it to input.h and we'll discuss... Who is intended user? What interface is expected to be used (evdev)?
Signature · 1 line
Dmitry
Quoted 2 lines · Dmitry Torokhov
Just post a patch adding it to
input.hand we'll discuss... Who is intended user? What interface is expected to be used (evdev)?
Patch included. We have code to pop up battery information in gnome-power-manager in response to this key being pressed, and evdev is the current interface for getting the keypress event.
include/linux/input.h +2 -0
@@ -344,6 +344,8 @@ struct input_absinfo {#define KEY_SAVE 234#define KEY_DOCUMENTS 235 +#define KEY_BATTERY 236 +#define KEY_UNKNOWN 240#define BTN_MISC 0x100
Signature · 1 line
Matthew Garrett | [email protected]
Quoted 3 lines · Matthew Garrett
Patch included. We have code to pop up battery information in gnome-power-manager in response to this key being pressed, and evdev is the current interface for getting the keypress event.
Hi - any feedback on this?
Thanks,
Signature · 1 line
Matthew Garrett | [email protected]
Dmitry Torokhov
maintainerQuoted 8 lines · Matthew Garrett
Quoted 3 lines · Matthew Garrett
Patch included. We have code to pop up battery information in gnome-power-manager in response to this key being pressed, and evdev is the current interface for getting the keypress event.
Hi - any feedback on this?
Oh, I am sorry. I will add it to my tree.
--
Dmitry