Adams Bros Blog

14Jun/093

Linux Macbook Function Key Mode – fnmode

So, I couldn't figure out how to get my Macbook function keys to default to function keys under Linux, rather than media keys such as brightness, volume control, etc.  I searched all over the net for information on this feature, and could only find stuff about pb_fnmode (which doesn't appear in the latest kernels).  So, I finally resorted to grepping "fnmode" out of the sources, and found the location that sets this.  Then, I noticed that the kernel module that handles Mac key mappings had a parameter that could be changed, called "fnmode".  Well, that gave me a clue that it may be in /sys/ somehwere.  So, I searched, and sure enough, it was there.  The following command will set the function keys to be the default action, rather than media keys.

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

The valid values are (0 = disabled, [1] = fkeyslast, 2 = fkeysfirst)

This effectively reverses the function key/media key mappings.

Comments (3) Trackbacks (0)
  1. Thanks for this note! It is one years old but it’s still working :)

  2. Thanks, very helpful!

    • Thanks, very helpful! To make it permanent, create a file called /etc/modprobe.d/apple.conf and put the line “options hid_apple fnmode=2″ into it.


Leave a comment


No trackbacks yet.