1

I have a MacBook Pro and installed Archlinux on it. I have read their article about Apple Keyboards, and managed to make the function key work properly (meaning pressing F5 actually triggers F5), fix some swapped keys using isolayout and would like to swap the opt and cmd key.

So I have create a file called /etc/modprobe.d/apple_keyboard.conf, and put the following content in it:

options hid_apple fnmode=2 isolayout=0 swap_opt_cmd=1

This works for the internal keyboard of the macbook, but I also have a apple bluetooth keyboard, for which these options don't seem to apply. Especially the opt and cmd key are not swapped for the bluetooth keyboard. I have no idea what I can check, so I would be thankful for any hint.

UPDATE:

Just realized that I have written isolayout instead of iso_layout. If I change that, < and ^ key are switched on the internal keyboard. I don't have the bluetooth keyboard with me, but I'll update on monday to see if it is at least correct with the other keyboard. However, if this is the case I would need a way to differ between both keyboards...

UPDATE

The bluetooth keyboard is still not affected by the iso_layout setting...

UPDATE

I've been told to add the output of dmesg, after plugging the keyboard (I did this by turning it off and on again), and this is what appears:

[56929.073859] hid-generic 0005:004C:026C.000B: unknown main item tag 0x0
[56929.073921] input: Magic Keyboard with Numeric Keypad as /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0/bluetooth/hci0/hci0:11/0005:004C:026C.000B/input/input24
[56929.074084] hid-generic 0005:004C:026C.000B: input,hidraw2: BLUETOOTH HID v0.80 Keyboard [Magic Keyboard with Numeric Keypad] on 34:36:3b:ca:dd:71
  • Please edit your question with the lines that appear in dmesg after you plug in the bluetooth keyboard. – dirkt Jan 27 '18 at 20:57
  • @dirkt Updated. Does look like the keyboard is not using hid_apple at all, right? – Daniel Rotter Jan 30 '18 at 9:58
  • Yup, looks like a generic HID device. The kernel input layer can remap scan codes to key codes via ioctls, but there are no packaged command line tools. You can try the udev hwdb instead. – dirkt Jan 31 '18 at 17:24
  • Hm, I see... Isn't there an easier way to make the bluetooth keyboard also use the hid-apple driver? – Daniel Rotter Feb 8 '18 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.