Thursday 29 June 2017

Apple Magic Keyboard 2 on Linux

Annoyingly, the Apple Magic Keyboard 2 is only recognised as a generic Bluetooth hid keyboard so the Fn and shortcut keys don't work correctly (using hid-generic kernel module).

I've started work on a set of patches for the hid-apple kernel module to add support for this keyboard.

Using Wireshark to sniff the Bluetooth packets, I've found the following are emitted as Fn KeyDown and KeyUp events:

Fn KeyDown: a1 01 00 00 00 00 00 00 00 00 02
Fn KeyUp:   a1 01 00 00 00 00 00 00 00 00 00

I'm going to attempt to add these as a customisation in the hid-apple module and see how I get on.