free5lot / hid-apple-patched

Allows to swap the Fn key and left Control key and other tweaks on Macbook Pro and Apple keyboards in GNU/Linux
GNU General Public License v2.0
349 stars 61 forks source link

Support for bluetooth #48

Closed nmattia closed 4 years ago

nmattia commented 6 years ago

This worked out of the box for my magic keyboard 2, thanks @free5lot !

I'm having some issues over bluetooth, I think the wrong driver is being picked up. It might default to hid-generic by default. If I specify the driver in my xorg.conf:

Section "InputClass"
        Identifier "magic keyboard"
        Driver "hid_apple"
        MatchProduct "Magic"
        MatchIsKeyboard "on"
EndSection

the keyboard becomes completely unusable (e.g. no key works). I noticed that the hid-ids.h specifies an ID for the keyboard (0x0267) which is the one I get from lsusb when I connect the keyboard through usb. Could it be that the kernel needs to know about the keyboard through some other mechanism over bluetooth?

free5lot commented 5 years ago

This worked out of the box for my magic keyboard 2, thanks @free5lot !

You are welcome!

About bluetooth connectivity - I don't know actually how to do this and have no bluetooth keyboard (especially apple one) to check.

But I'll leave this issue opened if you or someone other find any useful information and post it here, I'll add it to the readme.

Aetf commented 5 years ago

Related comments from jmt in AUR:

Has anyone else had issues with this on Linux 5.x? After I upgraded my kernel to 5.2, whenever I connected my Apple Magic keyboard over bluetooth, the hid-generic driver was being used and not the hid_apple module. Once I uninstalled this package the correct driver was being used. I wonder if this patch has a conflict with this package?

https://lore.kernel.org/patchwork/patch/978072/

daniellockyer commented 4 years ago

I've found the fix that needs to be applied to the repo, but I believe it also requires a commit to the kernel to fix a missing definition. I'll see what I can do

almson commented 4 years ago

Merging upstream fixes bluetooth. See PR #63

free5lot commented 4 years ago

Nice, than I'm closing this issue.

@nmattia and other interested parties - please check current patched version and in case of any issues feel free to message here or in a separate issue with details.