Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver should autosense ISO layout #44

Open
l1k opened this issue Aug 5, 2017 · 1 comment
Open

Driver should autosense ISO layout #44

l1k opened this issue Aug 5, 2017 · 1 comment

Comments

@l1k
Copy link
Contributor

l1k commented Aug 5, 2017

Commit a7a73f0 introduced a command line parameter whether to assume an ISO keyboard layout.

For USB keyboards, the mainline kernel gained the ability to autosense an ISO layout with commit torvalds/linux@bd77a0f by looking at the bCountryCode field in the HID descriptor: 0x13 means ISO layout and e.g. 0x0d means German (de_DE) layout.

It seems likely that Apple used the same values and somehow communicates the country code either upon initialization or with every packet. The first step would thus be to look for 0x13 in data coming from the keyboard controller on a MacBook with ISO keyboard, then check if a German keyboard has 0x0d in the same byte position.

See also the mailing list discussion on the patch for USB keyboards.

@jonas2515
Copy link

Just a little heads up here: I'm currently looking into why my Apple aluminium USB keyboard with german layout has those swapped keys and I've been digging through kernel history the whole day.

Please do not include a parameter that is necessary for unbreaking keyboards and leave them broken by default. That was done with the hid_apple iso_layout parameter and now we have a total mess where some keyboards work and some haven't been working for years, but nobody actually bothers to fix it because there's a parameter that can be set as a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants