Skip to contentSkip to conversation

dell-wmi: Set correct keycode for Fn + left arrow hotkey

PATCH In review Pali Rohár 2 participants 2 messages May 1, 2018 – May 7, 2018 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dell-wmi: Set correct keycode for Fn + left arrow hotkey

From: Henk <[email protected]>

Fn + left arrow hotkey combination is used for enabling/disabling automatic display brigthness based on integrated ALS sensor. For this purpose there is standard linux key KEY_BRIGHTNESS_AUTO so use it instead of KEY_UNKNOWN.

Tested on Dell Lattitude E6500.

---
Changes since v1 by Pali
* Update commit description

---
 drivers/platform/x86/dell-wmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell-wmi.c +1 -1
index 8d102195..7c918e37 100644
@@ -233,7 +233,7 @@ static const u16 bios_to_linux_keycode[256] = {
 	[18]	= KEY_PROG1,
 	[19]	= KEY_BRIGHTNESSDOWN,
 	[20]	= KEY_BRIGHTNESSUP,
-	[21]	= KEY_UNKNOWN,
+	[21]	= KEY_BRIGHTNESS_AUTO,
 	[22]	= KEY_KBDILLUMTOGGLE,
 	[23]	= KEY_UNKNOWN,
 	[24]	= KEY_SWITCHVIDEOMODE,
Signature · 1 line
2.11.0
#1 lore raw
Quoted 8 lines · Pali Rohár

From: Henk <[email protected]>

Fn + left arrow hotkey combination is used for enabling/disabling automatic display brigthness based on integrated ALS sensor. For this purpose there is standard linux key KEY_BRIGHTNESS_AUTO so use it instead of KEY_UNKNOWN.

Tested on Dell Lattitude E6500.

Pushed to my review and testing queue, thanks!

Quoted 26 lines

---
Changes since v1 by Pali
* Update commit description

---
 drivers/platform/x86/dell-wmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/dell-wmi.c +1 -2
index 8d102195..7c918e37 100644
@@ -233,7 +233,7 @@ static const u16 bios_to_linux_keycode[256] = {
        [18]    = KEY_PROG1,
        [19]    = KEY_BRIGHTNESSDOWN,
        [20]    = KEY_BRIGHTNESSUP,
-       [21]    = KEY_UNKNOWN,
+       [21]    = KEY_BRIGHTNESS_AUTO,
        [22]    = KEY_KBDILLUMTOGGLE,
        [23]    = KEY_UNKNOWN,
        [24]    = KEY_SWITCHVIDEOMODE,
--

2.11.0

Signature · 2 lines
With Best Regards,
Andy Shevchenko