Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

2 Answers 2

up vote 6 down vote accepted

The article there should help you.


I inserted the two echo linesin /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.

I only use Apple keyboards and I found they are easier to manage and configure under Linux than Windows. Also, that's the ONLY hardware I have from Apple.

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

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

Your Answer


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