Thread (9 messages) 9 messages, 5 authors, 2017-08-05

Re: [PATCH v3] HID: apple: Use country code to detect ISO keyboards

From: Bastien Nocera <hadess@hadess.net>
Date: 2017-06-20 11:55:02

On Sat, 2017-06-17 at 20:56 +0200, Lukas Wunner wrote:
On Thu, Jun 08, 2017 at 02:03:14PM +0200, Jiri Kosina wrote:
quoted
On Fri, 2 Jun 2017, Alex Henrie wrote:
quoted
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 <redacted>
Applied to for-4.13/apple. Thanks,
Sorry, I'm late to the party, just wanted to report that I've been
carrying this patch on my development branch for a while now and
have not noticed any adverse effects.  This is on a MacBookPro9,1
with a German ISO keyboard (USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO),
HID bCountryCode = 0x0d.

So, FWIW,
Tested-by: Lukas Wunner <lukas@wunner.de>
Does this patch mean we can assume that the hardware model is "pc105"
instead of various flavours of "mac" in xkeyboard-config's X keymaps?

Does this also work with older Apple USB keyboards? (Most of the older
ones triggered the "press those 2 buttons so we can figure out which
type of keyboard you have", under macOS)

Cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help