How to reverse Fn/F-Key behaviour in Ubuntu on Mac?

7,288

Solution 1

I have the same configuration. By default, on Ubuntu, the functionality is default.

For you to use function keys as F1,F2 :

run the below in terminal:

sudo su -c "echo -n 0x02 > /sys/module/hid_apple/parameters/fnmode"

PS: I have used the answer from here:

https://askubuntu.com/questions/449001/how-do-i-activate-function-keys-without-pressing-the-fn-button-in-the-mac-keyboa

Solution 2

A very clearly written answer is here: https://help.ubuntu.com/community/AppleKeyboard#Change_Function_Key_behavior

I have tested it, and it works like I expected (Pressing F2 now gets me F2, not "increase screen brightness")

I did find that the reboot was not optional - to see the change, I had to reboot.

  1. Run the following command to append the configuration line to the file /etc/modprobe.d/hid_apple.conf creating it if necessary:

$ echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf

  1. Trigger copying the configuration into the initramfs bootfile.

$ sudo update-initramfs -u -k all

  1. Optionally, reboot

$ sudo reboot

Share:
7,288

Related videos on Youtube

mySun
Author by

mySun

Loading...

Updated on September 18, 2022

Comments

  • mySun
    mySun over 1 year

    I have Ubuntu 16.04 dual booted on my Mac.
    In OS X I have System Prefs > Keyboard set to "Use all F1, F2, etc. keys as Standard Function keys"

    In Ubuntu this is reversed & I need to always use Fn/F-key to achieve the same result.

    Is there any way to reverse this behaviour.

  • Tetsujin
    Tetsujin over 7 years
    afaik, Intel Macs don't have open firmware, & EFI has no shell like OF used to. Essentially, there's nothing to get into before the OS starts to load
  • Johan
    Johan about 5 years
    This has to be re-applied after each bootup!