input: Add wireless and bluetooth keycodes
Subsystems (2)
PATCH 1/1 input: Add wireless and bluetooth keycodes
Add wireless and bluetooth keycodes. Also, add keycodes for these keys having a separate off state (This is true on some machines, such as many Acer laptops).
---
There don't appear to be any keycodes defined for wireless and bluetooth. On my laptop (Acer Aspire 5021) these buttons generate scancodes, rather than being hardware controlled or generating an ACPI hotkey event, so it would be nice to have some standard keycodes to map them to.
Plus, to cause more bother, the buttons on my laptop also generate a different scancode depending on whether the device in question is enabled or disabled (hence the _OFF entries). This is also true for an awful lot of other Acer laptops.
include/linux/input.h renamed from include/linux/input.h.orig +4 -0
@@ -506,6 +506,10 @@#define KEY_VOICEMAIL 0x1ac#define KEY_ADDRESSBOOK 0x1ad#define KEY_MESSENGER 0x1ae +#define KEY_WIRELESS 0x1b0 +#define KEY_WIRELESS_OFF 0x1b1 +#define KEY_BLUETOOTH 0x1b2 +#define KEY_BLUETOOTH_OFF 0x1b3#define KEY_DEL_EOL 0x1c0#define KEY_DEL_EOS 0x1c1
Dmitry Torokhov
maintainerHi Carlos,
Quoted 1 line · Carlos Corbacho
Add wireless and bluetooth keycodes.
Already have them:
#define KEY_BLUETOOTH 237
#define KEY_WLAN 238
Quoted 4 lines
Also, add keycodes for these
keys having a separate off state (This is true on some machines, such as many Acer laptops).
Not sure why this is needed.
Signature · 1 line
Dmitry
Dimitry,
Quoted 4 lines · On Thursday 03 May 2007 12:58:45 Dmitry Torokhov wrote:
Already have them:
#define
KEY_BLUETOOTH237
#defineKEY_WLAN238
My bad.
Quoted 5 lines
Quoted 3 lines
Also, add keycodes for these
keys having a separate off state (This is true on some machines, such as many Acer laptops).Not sure why this is needed.
On my laptop (this also affects other Acer's), the real problem is that there is no way to tell if the device is enabled or disabled[1], unless you're keeping track of this yourself (not always reliable). The only thing that always changes is the scancode for the button in question.
It would be nice to have a separate keycode to match to the different scancodes for on and off (then match these to the relevant calls), rather than say for instance, mapping both wireless scancodes to KEY_WLAN, then trying to keep track of the current state and then deciding on this whether to disable the device in question (and then potentially deciding wrong).
-Carlos
[1] The wireless/ bluetooth features on some Acer laptops are software enabled, by ACPI methods calling a Windows Management Instrumentation device - and to add insult to injury, the WMI interface provided doesn't give us any means to find out the current state of these features.
Signature · 3 lines
Uni: [email protected] Home: [email protected] GPG Key ID: 0x23EE722D