How to swap the “fn” use of Function keys on a *generic* Keyboard in Linux

2

After searching the internet for some answers, the only things I was able to found are related to the Apple keyboard.

My question is the same as in this question How to swap the “fn” use of Function keys on al Apple Keyboard in Linux but is more generic: I'd like to know if is possible to do the same thing done in the linked question with a standard pc keyboard under linux.

I suppose that there is a method to swap the Fn behaviour ( not from the BIOS, as I don't have that option ), but wasn't able to find a guide or how-to to change this.

Thanks :)

endorama

Posted 2013-03-11T18:34:35.843

Reputation: 123

Answers

1

Fn is not a normal keyboard key, such as the modifiers Ctrl, Shift and AltGr. For a standard modifier key, the microcontroller inside the keyboard sends a scancode for the modifier itself, which is then interpreted by the operating system and combined with other simultaneous key-presses. The Fn key is a form of meta-modifier key, in that it causes the operating system to see altered scancodes when other keys on the keyboard are pressed. This allows the keyboard to directly emulate a full-sized keyboard, so the operating system can use standard keymaps designed for a full-sized keyboard. However, because the operating system has no notion of the Fn key, the key can not normally be remapped in software, unlike all other standard keyboard keys.

While it is most common for the Fn key processing to happen directly in the keyboard micro-controller, offering no knowledge to the main computer of whether the Fn key was pressed, at least one manufacturer, Lenovo, performs this mapping in BIOS running on the main CPU. This allows remapping the Fn key by modifying the BIOS interrupt handler.

Source: http://en.wikipedia.org/wiki/Fn_key#Technical_details

Answer to the question: Remapping not possible via operating system but only via BIOS (in some cases).

erik

Posted 2013-03-11T18:34:35.843

Reputation: 1 519

Thanks for your reply! :) I didn't think to search wikipedia about it! Thanks again... – endorama – 2013-03-13T13:44:34.587

1

I have this problem, and I found an answer not for generic keyboard but for a Lenovo Thinkpad so I think I should mention it here. It is mentioned in question 648250: hold down "Fn" and tap "Esc" - on the T440 / T440p at least, this acts as "Fn lock" and effectively reverses the Fn behaviour, as required.

Dan Stowell

Posted 2013-03-11T18:34:35.843

Reputation: 545

this saved by butt, thank you. dell precision here, fix worked. – Ryan Yoosefi – 2017-12-03T09:12:52.617