From: Jamie Lentin <jm@lentin.co.uk>
To: Jiri Kosina <jkosina@suse.cz>, Antonio Ospite <ao2@ao2.it>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Jamie Lentin <jm@lentin.co.uk>
Subject: [PATCH 1/2] HID: lenovo: Move USB KEY_FILE to 0x00f9 to prevent scancode clash
Date: Sun, 9 Nov 2014 07:54:29 +0000 [thread overview]
Message-ID: <1415519670-24449-2-git-send-email-jm@lentin.co.uk> (raw)
In-Reply-To: <1415519670-24449-1-git-send-email-jm@lentin.co.uk>
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
next prev parent reply other threads:[~2014-11-09 8:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-09 7:54 [PATCH 0/2] HID: lenovo: Small fixups for compact keyboards Jamie Lentin
2014-11-09 7:54 ` Jamie Lentin [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415519670-24449-2-git-send-email-jm@lentin.co.uk \
--to=jm@lentin.co.uk \
--cc=ao2@ao2.it \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox