To be more clear, right now the volume and brightness keys are used and I have to hold Fn in order to execute an F1, F2, F3, F4, F5... command. Can I reverse this so it's function key by default and holding Fn enables the volume and other special controls?
-
Are you looking for a per-user or system-wide setting?– ændrükCommented Oct 15, 2010 at 17:13
-
Could you specify what sort of keyboard this is; a stand-alone Apple USB keyboard, or something built into a laptop? This will help others with the same question find it more easily.– Jeremy KerrCommented Feb 17, 2011 at 3:02
-
pwr.github.io/Solaar this is the solution– user2167582Commented Nov 2, 2016 at 17:17
4 Answers
This is described on the Ubuntu Community Wiki:
https://help.ubuntu.com/community/AppleKeyboard#Change_Function_Key_behavior
You can try:
sudo bash -c "echo 2 > /sys/module/hid_apple/parameters/fnmode"
If it works you can change this permanently (per the linked wiki page):
echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf
sudo update-initramfs -u -k all
sudo reboot # optional
-
11That link you posted is quite a lot to read. To help future users get to the permanent solution (that doesn't get undone after each reboot) faster, here's the 3 commands you need to type to make this permanent, per the link you posted above: 1)
echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf
, 2)sudo update-initramfs -u -k all
, 3) (optional)sudo reboot
. Done! Works for me on my 2008 white MacBook running Xubuntu 16.04 LTS. Commented Mar 20, 2017 at 19:55 -
can confirm that it works on MacBook Air 2015 with 16.04 on it– Ege SucuCommented Mar 28, 2018 at 6:47
-
1can confirm that it works on MacBook Pro 2015 with 19.04 on it– Kun RenCommented Apr 20, 2019 at 5:16
-
3worked with Ubuntu 18.04 and the Apple numeric pad wired keyboard– dcalapCommented Mar 17, 2020 at 8:22
-
1Not only does this work with Apple keyboards, but also apparently any keyboard that uses the same controller, such as the Varmilo VA87M: forums.servethehome.com/index.php?threads/…– joaoCommented Jan 10, 2021 at 19:04
please try this when editing directly fnmode fails.
echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode
On older Apple laptop hardware, this is accomplished by a configuration setting of PBButtonsd. You would need to add this line to the config file /etc/pbbuttonsd.conf:
KBDMode = fkeysfirst
PBButtonsd works on iBooks and PowerBooks (PowerPC-based) and MacBooks (Intel-based); the native Ubuntu package seems to have disappeared after Dapper Drake
-
Actually I'm running a Thinkpad T510, I just love these aluminum Apple keyboards.– MetaGuruCommented Oct 17, 2010 at 2:36
it may also be worthwhile to check your BIOS options for this feature. On my Dell Inspiron, this can be set through the BIOS. Hopefully it'll work for your hardware too.
-
As far as I know, there is no way to access to the BIOS for Mac. This is Apple approach– sangorysCommented Dec 22, 2020 at 11:53