Can anyone please tell me how to read the current state of the Fn-key in Linux? Is the current state of my keyboard in "Fn" mode or "normal" mode? I know that I can find out by pressing the keys, but I rather know before I try out.

I just can't find any device or /proc or mapping or whatever, where I can find out if pressing Fn-F1 produces a "sound off" (configured in my case) or triggers the F1-action bound on the F1 key.

  • 1
    What is your computer model? – harrymc Apr 23 at 10:39
  • Different models. DELL, HP, Noname... – CFrei Apr 23 at 12:39
  • What type of motherboard do you have? – Jeff Apr 28 at 17:17

It's not possible to do that on most common hardware, because the Fn key is completely unknown to the outside world except the keyboard controller and doesn't generate any scan code when pressing. Only when you hold it down in conjunction with another key then the keyboard controller will send the final scan code to the OS

There are some platforms where you can capture the Fn key status such as macOS or some custom boards. Everything is different on a Mac, even the Power button generates a scan code on it. If you aren't on such platforms, you're out of luck

But if you just want to get the function keys without pressing Fn then simply go into BIOS setup and change the setting to invert Fn behavior, most have that option along with the config to swap Fn/Ctrl keys. If there's no such option then you need to update the BIOS. You can also use the Fn-lock key on your keyboard if it's available

If there's a secondary option on F1 then you can also remap that combo to your desired action, for example if Fn+F1 produces the Volume down key then remap Volume down to the "sound off" action you want


You generally can't. The Fn key works entirely in hardware, unlike modifier keys like ctrl or shift. You can find more information on the Fn Key wikipedia (en.wikipedia.org/wiki/Fn_key).

  • Do you know if that is documented somewhere? – CFrei Apr 23 at 12:39
  • Mostly but not entirely true - depends on the computer model. – harrymc Apr 23 at 12:41
  • ...where can I find more documentation on this? – CFrei Apr 28 at 3:36
  • 1
    You can find more information on the Fn Key wikipedia (en.wikipedia.org/wiki/Fn_key). This page also contains a number of references to other websites. And yes, harrymc is correct there are exceptions, most notably Mac computers (they CAN remap fn) and some pc models use ACPI calls for the Fn key. However, for the vast majority of the time, no remapping of the Fn key is possible. – Silbee Apr 29 at 7:09
  • Please put this in the answer. That was what I was looking for. (Wiki did not cross my mind.) Thanks. – CFrei May 2 at 11:29

Your Answer

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

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