14

I am using an Apple keyboard. To get the default functionality of the function keys, I need to press fn+Function key.

This is quite annoying since I frequently use the function keys for debugging.

Is there any way I can get the default functionality out of the function keys, i.e., get the effect of pressing the Fn key without having to actually press it?

  • Suggestion: Use the USB cable with wireless. Which model of the Apple Keyboard? I'm using "Magic Keyboard with Numeric Keypad" (Model A1843) with a Lenovo T470s running Ubuntu 18.04 Gnome. When I click the "fn" button it dims my laptop display! So does the F1 button. Gnome says they're both the "Monitor brightness down" button according to the Keyboard Shortcuts setting panel. BUT... When USB is plugged in, the fn key works correctly.... And F1 makes it dim, F2 makes it bright. So the bluetooth causes mappings to become problematic it appears. – iJames May 16 at 19:43
10

The article there should help you.

https://help.ubuntu.com/community/AppleKeyboard

I inserted these two echo lines into /etc/rc.local:

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

Those are inserted just before the "exit 0" line.

  • 2
    Found only the first echo 2 > /sys/module/hid_apple/parameters/fnmode was enough for me on ubuntu 12.04 with alum apple wired keybd. – Maks Mar 27 '13 at 23:12
  • You can use echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode so you won't have to drop into root shell to run the command. – Dan Feb 12 '16 at 12:14
  • 1
    I know this is an old thread, but this problem exists in 16.04. This solution was accepted, but the one below seems like "the right way" (tm). Would you agree? – Ivan Perez May 1 '16 at 15:26
6

From the Ubuntu community wiki on Apple Keyboards... Open this file with root permissions in terminal:

gksudo gedit /etc/modprobe.d/hid_apple.conf

Then add to the end of the file:

options hid_apple fnmode=2

And then finally in terminal...

sudo update-initramfs -u

Reboot your computer.

This will change the default keys to being the Function keys, E.g F8 is F8 instead of Play/Pause song. Hope this helps! ^.^

  • This worked for 14.04 on MacBook Pro 8,1. Thanks! – mcmlxxxiii May 18 '15 at 8:18
  • Works on 16.04 as well. – Lambart Sep 27 '16 at 4:40
0
sudo add-apt-repository ppa:daniel.pavel/solaar
sudo apt-get update
sudo apt-get install solaar
solaar

with a mac keyboard youll get a radio button to toggle fn

http://i.stack.imgur.com/9omc6.png

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy