linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: apple: Add support for recent firmware
@ 2020-01-29  6:26 Mansour Behabadi
  2020-02-04 12:48 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Mansour Behabadi @ 2020-01-29  6:26 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Mansour Behabadi, Benjamin Tissoires, linux-input, linux-kernel

Magic Keyboards with more recent firmware (0x0100) report
Fn key differently. Without this patch, Fn key may not
behave as expected and may not be configurable via hid_apple
fnmode module parameter.

Signed-off-by: Mansour Behabadi <mansour@oxplot.com>
---
 drivers/hid/hid-apple.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 6ac8becc2372..d732d1d10caf 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -340,7 +340,8 @@ static int apple_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 		unsigned long **bit, int *max)
 {
 	if (usage->hid == (HID_UP_CUSTOM | 0x0003) ||
-			usage->hid == (HID_UP_MSVENDOR | 0x0003)) {
+			usage->hid == (HID_UP_MSVENDOR | 0x0003) ||
+			usage->hid == (HID_UP_HPVENDOR2 | 0x0003)) {
 		/* The fn key on Apple USB keyboards */
 		set_bit(EV_REP, hi->input->evbit);
 		hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_FN);
-- 
2.25.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-04 12:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-29  6:26 [PATCH] HID: apple: Add support for recent firmware Mansour Behabadi
2020-02-04 12:48 ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).