Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an apple slim keyboard (USB) and if I want to use one of the Function Key as-is, I also have to press "fn " key first. Otherwise, it will try to perform the other function of the key, such as increasing or decreasing the display intensity, change the volume/mute, etc....

As well, the fn key is actually in the position of the "insert" key for regular keyboards. How can I fix all of that ?

I really like this keyboard, as it make my typing much easier, and much more silent too. But some of those mappings that are different sometime bug me.

Thanks :-)

share|improve this question

3 Answers 3

up vote 14 down vote accepted
echo 0 > /sys/module/hid_apple/parameters/fnmode

The above will prevent you from having to reboot. Adding the option is a good idea, so the change persists through reboots.

  • 0 = Fn key disabled
  • 1 = Fn key pressed by default
  • 2 = Fn key released by default

From /drivers/hid/hid-apple.c line 42:

Mode of fn key on Apple keyboards (0 = disabled, [1] = fkeyslast, 2 = fkeysfirst)

share|improve this answer
    
It seems I'm not using an apple driver, so this isn't working for me. I have an off-brand apple keyboard (Razor Black Widow). –  Kieveli May 8 '13 at 14:26

The answer above about what option to set in /etc/modprobe.d is a bit out of date. Fortunately there is detailed documentation on the Apple Keyboard support:

  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

I'd personally recommend sudo update-initramfs -u -k all to update it for all your kernels (once you are confident the setting works as expected).

Setting the fnmode under /sys still works the same way:

sudo -s 'echo 2 > /sys/module/hid_apple/parameters/fnmode'

The values in both methods are as follows:

  • 0 = disabled : Disable the 'fn' key. Pressing 'fn'+'F8' will behave like you only press 'F8'
  • 1 = fkeyslast : Function keys are used as last key. Pressing 'F8' key will act as a special key. Pressing 'fn'+'F8' will behave like a F8.
  • 2 = fkeysfirst : Function keys are used as first key. Pressing 'F8' key will behave like a F8. Pressing 'fn'+'F8' will act as special key (play/pause)
share|improve this answer
    
Thanks - I've added this method to my Linux Mint setup scripts at github.com/duncan-bayne/mint-setup –  Duncan Bayne Apr 3 at 22:52
    
All you need is to run as root (on Fedora distro at least) echo 2 > /sys/module/hid_apple/parameters/fnmode to make FN as primary and Mac controls secondary. Oh, yeah!! Thanks, wuputah!! –  Ilia Rostovtsev May 22 at 20:21

From Here

how do we swap the function of the Fn key?

First edit /etc/modprobe.d/options

sudo nano /etc/modprobe.d/options

and make sure it has the line

options hid pb_fnmode=2

Then save and exit. Lastly, we need to update ramfs:

sudo update-initramfs -u -v -k uname -r

Then just reboot!

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.