Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using an Apple keyboard. To get the default functionality of the function keys, I need to press fn+Function key.

This is quite annoying since I frequently use the function keys for debugging.

Is there any way I can get the default functionality out of the function keys, i.e., get the effect of pressing the Fn key without having to actually press it?

share|improve this question
up vote 9 down vote accepted

The article there should help you.

I inserted these two echo lines into /etc/rc.local:

echo 2 > /sys/module/hid_apple/parameters/fnmode
echo 2 > /sys/module/apple/parameters/fnmode

Those are inserted just before the "exit 0" line.

share|improve this answer
That worked like a charm! Thanks! – user13593 Apr 5 '11 at 17:34
Found only the first echo 2 > /sys/module/hid_apple/parameters/fnmode was enough for me on ubuntu 12.04 with alum apple wired keybd. – Maks Mar 27 '13 at 23:12
You can use echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode so you won't have to drop into root shell to run the command. – Dan Feb 12 at 12:14
I know this is an old thread, but this problem exists in 16.04. This solution was accepted, but the one below seems like "the right way" (tm). Would you agree? – Ivan Perez May 1 at 15:26

From the Ubuntu community wiki on Apple Keyboards... Open this file with root permissions in terminal:

gksudo gedit /etc/modprobe.d/hid_apple.conf

Then add to the end of the file:

options hid_apple fnmode=2

And then finally in terminal...

sudo update-initramfs -u

Reboot your computer.

This will change the default keys to being the Function keys, E.g F8 is F8 instead of Play/Pause song. Hope this helps! ^.^

share|improve this answer
This worked for 14.04 on MacBook Pro 8,1. Thanks! – mcmlxxxiii May 18 '15 at 8:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.