input: A few new KEY_xxx definitions
PATCH 1/1 input: A few new KEY_xxx definitions
From: Lennart Poettering <[email protected]>
The attached patch adds four new KEY_xxx definitions to linux/input.h.
KEY_BLUETOOTH, KEY_WLAN:
Some laptops have seperate "rfkill" buttons for disabling/enabling Bluetooth and WLAN.
KEY_POWERPLUG, KEY_POWERUNPLUG:
Some laptops generate a fake key event when the power cord is plugged or unplugged. (Notably MSI laptops, such as S270)
Applies to all recent 2.6 kernels.
Please merge,
Lennart
---
linux/input.h renamed from linux/input.h.orig +6 -0
@@ -347,8 +347,14 @@ struct input_absinfo {#define KEY_BATTERY 236 +#define KEY_BLUETOOTH 237 +#define KEY_WLAN 238 +#define KEY_UNKNOWN 240 +#define KEY_POWERPLUG 239 +#define KEY_POWERUNPLUG 241 +#define BTN_MISC 0x100#define BTN_0 0x100#define BTN_1 0x101
Quoted 6 lines · Lennart Poettering
From: Lennart Poettering <[email protected]>
The attached patch adds four new
KEY_xxxdefinitions tolinux/input.h.
KEY_BLUETOOTH,KEY_WLAN:
Quoted 8 lines
Some laptops have seperate "rfkill" buttons for disabling/enabling Bluetooth and WLAN.
KEY_POWERPLUG,KEY_POWERUNPLUG:Some laptops generate a fake key event when the power cord is plugged or unplugged. (Notably MSI laptops, such as S270)
How do these events get delivered? Are you saying that atkbd reports key presses when pulling out AC cord?
Signature · 1 line
Dmitry
Quoted 8 lines · Dmitry Torokhov
Quoted 5 lines
KEY_POWERPLUG,KEY_POWERUNPLUG:Some laptops generate a fake key event when the power cord is plugged or unplugged. (Notably MSI laptops, such as S270)
How do these events get delivered? Are you saying that atkbd reports key presses when pulling out AC cord?
Yes, exactly.
Lennart
Quoted 4 lines · Lennart Poettering
Quoted 2 lines · Dmitry Torokhov
Quoted 2 lines
KEY_POWERPLUG,KEY_POWERUNPLUG:
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
Some laptops generate a fake key event when the power cord is plugged or unplugged. (Notably MSI laptops, such as S270)
How do these events get delivered? Are you saying that atkbd reports key presses when pulling out AC cord?
Yes, exactly.
Lennart,
I applied part of the patch defining KEY_BLUETOOTH and KEY_WLAN, but I did not apply KEY_POWER[UN]PLUG. I feel that these should not be defined as KEY_* events but (if we decide that they should be reported through input layer) as EV_PWR events.
Signature · 1 line
Dmitry