How to Use the Apple Magic Keyboard. To connect a Magic Keyboard to your Mac, iPhone, iPad, or Apple TV, enable Bluetooth and then press the power button on the keyboard. Once the devices pair, the keyboard will be ready to use.
Note: Do not forget to include the configuration file in initramfs otherwise it will not work automatically after boot. Refer to or (the hook you might need is called modconf) about how to do that.After installation the change is not picked up by the kernel immediately. The simplest way is to just reboot your system and the new behavior should be in effect.Use un-apple-keyboardIf you do not need all of these customizations and you do not want to compile a new module manually or using dkms, there is an AUR package AUR which does not rely on a new kernel module, but rather just to mappings. It enables the following features:. The keyboard is considered as an ISO keyboard (e.g. Located at the right of the Left Shift key are working like expected). The function keys are disabled by default.
You need to press the Fn key in combination to trigger them. By default, the behavior are thus keys F1 to F12. The Alt and Cmd keys are swapped. F13 is mapped to SYSRQ, F14 to Scroll Lock and F15 to Pause.The first 3 aforementioned features are brought to you using the default linux kernel module hid-apple.The last one is provided by providing a mapping to AUR.Change the Behavior Without Reboot.
Warning: If the builtin keyboard and touch pad are the only input device, beware that doing so might leave your computer in an inoperable state unless hard reboot when the second command failes.To reload the kernel module without reboot, run rmmod hidapple && modprobe hidapple.Magic Keyboard does not connectIf you have a magic keyboard that will not connect to the system through the built in tools, such as the Gnome 3 bluetooth menu in settings, install and its dependencies and attempt to connect with it. If it still fails to connect, make sure you have bluetoothctl and hcitool installed.See also.