* [PATCH 0/2] HID: lenovo: Small fixups for compact keyboards
@ 2014-11-09 7:54 Jamie Lentin
2014-11-09 7:54 ` [PATCH 1/2] HID: lenovo: Move USB KEY_FILE to 0x00f9 to prevent scancode clash Jamie Lentin
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jamie Lentin @ 2014-11-09 7:54 UTC (permalink / raw)
To: Jiri Kosina, Antonio Ospite; +Cc: linux-input, linux-kernel, Jamie Lentin
Some small problems that have since been picked up since my patchset that
introduced support for the Thinkpad Compact Keyboards[0]. Both have been tested
on 3.18-rc1.
There are other outstanding problems that will require less trivial patches:
* The USB keyboard needs a patch to the HID descriptor table for the horizontal
scroll wheel events to be recognised.
* There is potentially a sensitivity control to expose via. sysfs, but needs
more investigation.
* The bluetooth keyboard mouse buttons still autorepeat. Since they are part of
the same input device as the keys I'm not sure this is currently solvable.
The first 2 I will sort out once enough free time appears, if you would prefer
a single large patchset, feel free to ignore this and wait for a bigger
patchset.
Many thanks,
[0] https://lkml.org/lkml/2014/7/23/702
Jamie Lentin (2):
HID: lenovo: Move USB KEY_FILE to 0x00f9 to prevent scancode clash
HID: lenovo: Don't set EV_REP to avoid repeating mice buttons
drivers/hid/hid-lenovo.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] HID: lenovo: Move USB KEY_FILE to 0x00f9 to prevent scancode clash
2014-11-09 7:54 [PATCH 0/2] HID: lenovo: Small fixups for compact keyboards Jamie Lentin
@ 2014-11-09 7:54 ` Jamie Lentin
2014-11-09 7:54 ` [PATCH 2/2] HID: lenovo: Don't set EV_REP to avoid repeating mice buttons Jamie Lentin
2014-11-11 10:47 ` [PATCH 0/2] HID: lenovo: Small fixups for compact keyboards Jiri Kosina
2 siblings, 0 replies; 4+ messages in thread
From: Jamie Lentin @ 2014-11-09 7:54 UTC (permalink / raw)
To: Jiri Kosina, Antonio Ospite; +Cc: linux-input, linux-kernel, Jamie Lentin
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 <jm@lentin.co.uk>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] HID: lenovo: Don't set EV_REP to avoid repeating mice buttons
2014-11-09 7:54 [PATCH 0/2] HID: lenovo: Small fixups for compact keyboards Jamie Lentin
2014-11-09 7:54 ` [PATCH 1/2] HID: lenovo: Move USB KEY_FILE to 0x00f9 to prevent scancode clash Jamie Lentin
@ 2014-11-09 7:54 ` Jamie Lentin
2014-11-11 10:47 ` [PATCH 0/2] HID: lenovo: Small fixups for compact keyboards Jiri Kosina
2 siblings, 0 replies; 4+ messages in thread
From: Jamie Lentin @ 2014-11-09 7:54 UTC (permalink / raw)
To: Jiri Kosina, Antonio Ospite; +Cc: linux-input, linux-kernel, Jamie Lentin
On the USB keyboard, the VENDOR hotkeys share the same device as the
mouse. Setting EV_REP also affects mouse buttons, so leave it off.
The bluetooth keyboard still has autorepeating mouse buttons, as it
only has one device and is set by the KEYBOARD pages.
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
---
drivers/hid/hid-lenovo.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index 4716f1e..4c55f4d 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -62,7 +62,6 @@ static int lenovo_input_mapping_cptkbd(struct hid_device *hdev,
/* HID_UP_LNVENDOR = USB, HID_UP_MSVENDOR = BT */
if ((usage->hid & HID_USAGE_PAGE) == HID_UP_MSVENDOR ||
(usage->hid & HID_USAGE_PAGE) == HID_UP_LNVENDOR) {
- set_bit(EV_REP, hi->input->evbit);
switch (usage->hid & HID_USAGE) {
case 0x00f1: /* Fn-F4: Mic mute */
map_key_clear(KEY_MICMUTE);
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] HID: lenovo: Small fixups for compact keyboards
2014-11-09 7:54 [PATCH 0/2] HID: lenovo: Small fixups for compact keyboards Jamie Lentin
2014-11-09 7:54 ` [PATCH 1/2] HID: lenovo: Move USB KEY_FILE to 0x00f9 to prevent scancode clash Jamie Lentin
2014-11-09 7:54 ` [PATCH 2/2] HID: lenovo: Don't set EV_REP to avoid repeating mice buttons Jamie Lentin
@ 2014-11-11 10:47 ` Jiri Kosina
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2014-11-11 10:47 UTC (permalink / raw)
To: Jamie Lentin; +Cc: Antonio Ospite, linux-input, linux-kernel
On Sun, 9 Nov 2014, Jamie Lentin wrote:
> Some small problems that have since been picked up since my patchset that
> introduced support for the Thinkpad Compact Keyboards[0]. Both have been tested
> on 3.18-rc1.
Both patches applied.
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-11 10:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-09 7:54 [PATCH 0/2] HID: lenovo: Small fixups for compact keyboards Jamie Lentin
2014-11-09 7:54 ` [PATCH 1/2] HID: lenovo: Move USB KEY_FILE to 0x00f9 to prevent scancode clash Jamie Lentin
2014-11-09 7:54 ` [PATCH 2/2] HID: lenovo: Don't set EV_REP to avoid repeating mice buttons Jamie Lentin
2014-11-11 10:47 ` [PATCH 0/2] HID: lenovo: Small fixups for compact keyboards Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox