]> git.baikalelectronics.ru Git - kernel.git/commit
HID: apple: Use country code to detect ISO keyboards
authorAlex Henrie <alexhenrie24@gmail.com>
Fri, 2 Jun 2017 15:28:39 +0000 (09:28 -0600)
committerJiri Kosina <jkosina@suse.cz>
Thu, 8 Jun 2017 11:58:03 +0000 (13:58 +0200)
commit71f9f58d86fcb4ccb75001a0aee7b762c52ab5d3
treee081978ea7dd599f40629a16cf264d86a3e417a0
parentedd82974ad17309d1066bd2e0d8fbcc4205b669c
HID: apple: Use country code to detect ISO keyboards

At least on newer laptops, Apple uses the same USB ID for both ISO and
ANSI keyboards. However, they have been good about filling in the
bCountryCode field in the HID descriptor on all of their keyboards. A
value of 13 indicates an ISO layout and other values indicate various
country-specific ANSI layouts.

With this patch, users of Apple US keyboards will no longer have to run
`echo 0 > /sys/module/hid_apple/parameters/iso_layout` to get a working
tilde key.

Please test this patch and send feedback if you have a Macbook or an
Apple keyboard.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-apple.c