Apple keyboard Ubuntu

by on under sysadmin
1 minute read

UK Apple keyboard layout and fn key fix for Ubuntu

I cannot recall which of the two methods I used most recently. I suspect the hid_apple.conf method is a better first bet. I provide two methods in case one works in the instance the other doesn’t.

Both methods aim to allow the use of F1-F12 function keys by setting the fnmode so they only act like media buttons when the fn key is held. They also aim to fix the layout to have the correct position for UK <, >, @, #, ~, £, $ keys

hid_apple.conf method

You can add the following lines to: /etc/modprobe.d/hid_apple.conf

$ cat /etc/modprobe.d/hid_apple.conf
options hid_apple fnmode=2
options hid_apple iso_layout=0

rc.local method

You can add the following lines to: /etc/rc.local

$ cat /etc/rc.local
# Apple keyboard fix.
echo "2" > /sys/module/hid_apple/parameters/fnmode
echo "0" > /sys/module/hid_apple/parameters/iso_layout

exit 0

Check it worked

Give the system a reboot and cat the following to check those changes persisted after reboot.

$ cat /sys/module/hid_apple/parameters/fnmode
$ cat /sys/module/hid_apple/parameters/iso_layout
comments powered by Disqus