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

Help Magic Keyboard Touch ID and Ubuntu 21.10 #79

Open cue108 opened 2 years ago

cue108 commented 2 years ago

I simply don't know how to configure it. The module is installed via the first instructions in the Readme.md and I have reboot.

The module is not even loaded:

lsmod | grep hid
hid_magicmouse         20480  0
hidp                   32768  2
bluetooth             663552  42 btrtl,hidp,btintel,btbcm,bnep,btusb,rfcomm
mac_hid                16384  0
hid_generic            16384  0
usbhid                 61440  0
hid                   135168  4 hidp,usbhid,hid_generic,hid_magicmouse

If I do a modprobe it looks fine but I think the module is not used as I cannot identify any change in the keyboard usage:

sudo modprobe -v hid_apple
insmod /lib/modules/5.13.0-21-generic/updates/dkms/hid-apple.ko fnmode=2 swap_opt_cmd=1 rightalt_as_rightctrl=1 ejectcd_as_delete=1 swap_fn_f13_insert=1 

I have a Magic Keyboard with Touch ID together with a magic mouse and I am running Ubuntu 21.10 on a PC.

Any hint is appreciated!

d0nth4x commented 2 years ago

Look like same problem as mine. You have to check your product id and add it like me. Check PR #77 . idk what is prod id for keyboard with touch id so you have to use tool like Hardinfo and check it. Hope it helps ;)

cue108 commented 2 years ago

Thanx a lot. I pulled your fork and it didn't work but I could find the USB id by checking syslog.

Maybe you want to add your PR with the following address in hid-ids.h:

`

define USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_touch_id_2021 0x029f

`

and add the following lines to hid-apple.c:

    { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_touch_id_2021),
        .driver_data = APPLE_HAS_FN },
    { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_touch_id_2021),
        .driver_data = APPLE_HAS_FN },

It works great!

cue108 commented 2 years ago

It's called the product ID. In your syslog it even explicitly says it "idProduct=029c" but you can also use the usb device id, just use the last 4 digits after the ':'. also your hidID works: hid-generic 0003:05AC:029C.0010

It's always 029C in your case. cheers

On Thu, 2021-11-25 at 04:48 -0800, Sergey wrote:

@cue108 @d0nth4x Guys, how is it possible to find device id like "0x02.." ? I tried using two methods but got nothing similar:

  1. lsusb Bus 003 Device 008: ID 05ac:029c Apple, Inc. Magic Keyboard
  2. tail -f /var/log/syslog and dettach/attach keyboard
ghost commented 2 years ago

In my case it's 029a