Apple keyboard with Linux

After having installed Ubuntu Linux 14.04 on an Apple Mac I found that the keyboard layout was not quite correct, e.g. function keys were not easily accesible and some characters were missing. The changes below will turn the keyboard into a keyboard with standard PC layout.

The side effect of this is that some keys will have the incorrect label (`¬\|#~2″‘@), but at least they will all be accessible in the ‘correct’ position.

Edit the module options for hid_apple:
sudo nano /etc/modprobe.d/hid_apple.conf
Insert the following:
options hid_apple fnmode=2
options hid_apple iso_layout=0
Update initrd:
update-initramfs -u -k all

3 thoughts on “Apple keyboard with Linux”

  1. How did you get the keyboard to connect initially? I’ve tried many different things with no success. I can see it when I run hcitool scan, but can’t get it to connect.

    1. The only thing I can think of is that some required kernel modules do not get loaded automatically (e.g. because they ar black-listed). Modules loaded on my system are:
      $ lsmod | grep apple
      hid_appleir 13010 0
      hid_apple 13386 0
      applesmc 19308 0
      input_polldev 13896 1 applesmc
      apple_bl 13993 0
      hid 106148 4 hid_generic,usbhid,hid_appleir,hid_apple
      $ lsmod | grep hid
      hid_appleir 13010 0
      hid_apple 13386 0
      mac_hid 13205 0
      hid_generic 12548 0
      usbhid 52659 0
      hid 106148 4 hid_generic,usbhid,hid_appleir,hid_apple
      $ lsmod | grep hci
      firewire_ohci 40409 0
      firewire_core 68769 1 firewire_ohci
      ahci 25819 3
      libahci 32716 1 ahci

Leave a Reply

Your e-mail address will not be published. Required fields are marked *