forked from lentinj/tp-compact-keyboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1001-HID-lenovo-Move-USB-KEY_FILE-to-0x00f9-to-prevent-sc.patch
51 lines (45 loc) · 1.54 KB
/
1001-HID-lenovo-Move-USB-KEY_FILE-to-0x00f9-to-prevent-sc.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 40d0b99beb52e25a444b914e4986f6c33a43fee8 Mon Sep 17 00:00:00 2001
From: Jamie Lentin <[email protected]>
Date: Mon, 3 Nov 2014 22:14:38 +0000
Subject: [PATCH 1/2] HID: lenovo: Move USB KEY_FILE to 0x00f9 to prevent
scancode clash
The bluetooth keyboard also generates 0x00fa when the middle button is
pressed. Move the made-up report out of the way so we don't trigger
KEY_FILE when middle button is pressed
Signed-off-by: Jamie Lentin <[email protected]>
---
drivers/hid/hid-lenovo.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index bf227f7..4716f1e 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -85,13 +85,13 @@ static int lenovo_input_mapping_cptkbd(struct hid_device *hdev,
case 0x00f8: /* Fn-F11: View open applications (3 boxes) */
map_key_clear(KEY_SCALE);
return 1;
- case 0x00fa: /* Fn-Esc: Fn-lock toggle */
- map_key_clear(KEY_FN_ESC);
- return 1;
- case 0x00fb: /* Fn-F12: Open My computer (6 boxes) USB-only */
+ case 0x00f9: /* Fn-F12: Open My computer (6 boxes) USB-only */
/* NB: This mapping is invented in raw_event below */
map_key_clear(KEY_FILE);
return 1;
+ case 0x00fa: /* Fn-Esc: Fn-lock toggle */
+ map_key_clear(KEY_FN_ESC);
+ return 1;
}
}
@@ -207,8 +207,8 @@ static int lenovo_raw_event(struct hid_device *hdev,
&& data[0] == 0x15
&& data[1] == 0x94
&& data[2] == 0x01)) {
- data[1] = 0x0;
- data[2] = 0x4;
+ data[1] = 0x00;
+ data[2] = 0x01;
}
return 0;
--
2.1.0