summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorMansour Behabadi <mansour@oxplot.com>2020-01-29 17:26:31 +1100
committerJiri Kosina <jkosina@suse.cz>2020-02-12 14:17:42 +0100
commite433be929e63265b7412478eb7ff271467aee2d7 (patch)
treef24333ad62bb6bdf4e61459a83c650aa0001dfd8 /drivers/hid
parentbeae56192a2570578ae45050e73c5ff9254f63e6 (diff)
downloadlinux-e433be929e63265b7412478eb7ff271467aee2d7.tar.gz
linux-e433be929e63265b7412478eb7ff271467aee2d7.tar.bz2
linux-e433be929e63265b7412478eb7ff271467aee2d7.zip
HID: apple: Add support for recent firmware on Magic Keyboards
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> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-apple.c3
1 files changed, 2 insertions, 1 deletions
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);