Fixing Apple Keybard Function Keys in Ubuntu

Apple keyboards under Ubuntu have overridden function keys and an "fn" button that switched between modes. For example, [f1] will decrase the brightness of the screen unless you press [fn]-[f1] to activate the actual [f1] function.  That seems backward to me.  Here's how to put them back.


This section describe how to change the behavior of 'fn' with immediate effect (Restarting will reset the configuration). Execute the following commands to change the fnmode parameters. See section above for a description of available value.
$ sudo bash
# modprobe hid_apple
# echo 2 > /sys/module/hid_apple/parameters/fnmode
# exit


This section describe how to change the behavior of 'fn' permanently. There is many way to proceed with this modification. Each sub section describe one way to permanently change the configuration.
With .conf file (Recommended)

1. Edit or create the file /etc/modprobe.d/hid_apple.conf, e.g.:
gksudo gedit /etc/modprobe.d/hid_apple.conf

2. Add this line to the previously open file.
options hid_apple fnmode=2
3. Save the file and execute the following command to notify hid_apple module to reload it's configuration.
sudo update-initramfs -u
4. Reboot


UPDATE:  As of 2011, this stopped working for me.  Instead, I had to install the package pbbuttonsd and edit /etc/pbbuttonsd.conf to change the line KBDMode to fkeysfirst.

sudo apt-get update; sudo apt-get install pbbuttonsd; sudo gedit /etc/pbbuttonsd.conf

No comments

Post a Comment