There is some built-in functionality on the MacBook hardware that I have that I have grown accustomed to, but not really enjoyed. It has been one of those slight annoyances–something that you just kind of get used to–although it gets under your skin. Well today I decided I had enough and hunted down the solution. And, as is my nature, I have decided to blog my findings so you won’t have to look as hard as I have.
To reverse the function key behaviour on MacBook and MacBook Pro (I assume) you need to create an entry in one of the files in modprobe.d/. The reason we want to do this is that, by default, the fn key behaviour is already reversed from what you might expect. If there was such a key as fn-lock (think caps lock) imagine that being stuck on all the time. This suggestion will fix that for you.
First, you’ll need to create a new file in the /etc/modprobe.d/ directory. For my machine and for the sake of this tutorial we’ll call that file ‘function’. You might use a command such as:
sudo vim /etc/modprobe.d/function
Within that file you will want to add one of the two below entries depending on your kernel version. (If you are unsure your kernel version run the command ‘uname -r‘ to find out.)
# Reversing the fn behaviour ( >= 2.6.20 kernel)
options hid pb_fnmode=2
# Reversing the fn behaviour ( < 2.6.20 kernel)
options usbhid pb_fnmode=2
After you have pasted in the appropriate entry you may want to restart your machine or try reloading the hid or usbhid kernel module, after which the function behaviour should be corrected.