DEV Community

Giancarmine
Giancarmine

Posted on

Quick fix fn keys in Ubuntu

If you have a 60% keyboard (a Blitzwolf kb1 in my case), you may have noticed that the Function Keys (F1, F2, etc.) are not enabled by default. This is because the keyboard is in "Apple mode" by default. To change the Function Key behavior to the standard Ubuntu layout, you need to execute the following command:

echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode
Enter fullscreen mode Exit fullscreen mode

This will change the FnMode to 2, which corresponds to the standard Ubuntu layout.

To make this change permanent, you can add the following line to your /etc/rc.local file:

echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode
Enter fullscreen mode Exit fullscreen mode

This will ensure that the FnMode is set to 2 every time you boot up your computer.

Here are the steps on how to do this:

  • Open the /etc/rc.local file in a text editor.
  • Add the following line to the end of the file:
echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode
Enter fullscreen mode Exit fullscreen mode
  • Save and close the file.
  • Reboot your computer.

Once you have rebooted your computer, the FnMode will be set to 2 and the Function Keys will work as expected 🔥

Top comments (2)

Collapse
 
pxlmastrxd profile image
Pxlmastr • Edited

I'll be sure to keep this in common when I get an actual laptop. Great tip!

Collapse
 
el_giancar profile image
Giancarmine

Nice to help!