Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intercepting the Fn key on laptops

Sometimes when I work on Thinkpads/MSI laptops, the Ctrl and Fn key are swapped (Fn being the leftmost key), and it drives me nuts - I keep hitting Fn instead of Ctrl.

I was wondering if it's at all possible to intercept the Fn key. I'd like to write a hook that swaps the Ctrl / Fn keys, but it seems that Fn is not being processed by the OS at all.

Any ideas?

like image 270
Igal Tabachnik Avatar asked Feb 05 '09 06:02

Igal Tabachnik


People also ask

How do you turn off Fn key on laptop?

To enable FN Lock on the All in One Media Keyboard, press the FN key, and the Caps Lock key at the same time. To disable FN Lock, press the FN key, and the Caps Lock key at the same time again.

How do you break a Fn lock?

For example, on the keyboard below, the Fn Lock key appears as a secondary action on the Esc key. To enable it, we'd hold Fn and press the Esc key. To disable it, we'd hold Fn and press Esc again. It functions as a toggle just like Caps Lock does.

How do I activate Fn keys?

Press fn and the left shift key at the same time to enable fn (function) mode. When the fn key light is on, you must press the fn key and a function key to activate the default action.

How do I know if my Fn key is locked?

The Fn lock key also impacts other toggle keys such as Caps Lock or Num Lock so it's easy to find out if the Fn keys are locked. On your keyboard, look for an Fn, F lock, or F Mode key. Depending on your laptop, you should press for one time or press and hold for a few seconds.


2 Answers

Sorry. As you mentioned, the Fn key isn't processed by the OS, but received as tuples of Fn + [key] . The best you could probably do would be mapping every Fn + [key] combination to ctrl (and that's only if you never use Fn keys).

Edit: Found this. Before you give up hope, might want to give it a try.

like image 112
Mike Douglas Avatar answered Oct 05 '22 12:10

Mike Douglas


As stated above the Fn key generally operates on a lower level than the OS and hence modifying its behaviour Generally this depends on the manufacturer. Some manufacturers who are not jerks generally provide an option (typically in BIOS) which will allow swapping Fn - Ctrl keys. I have also heard of people taking the extreme option of physically modifying their keyboards (opening them up and rerouting the circuits in the wafer) to swap the Fn - Ctrl keys.

Thinkpad specific: Lenovo included a bios option for their Tx10 (or Tx20? not sure) and above series laptops for Fn - Ctrl switch.

For older models, a user called middleton on forums.notebookreview.com has posted a series of modified BIOS's for lenovo laptops that swap the Fn - Ctrl. It should go without mentioning that as these are completely off-reservation they are to be used at ones own risk.

http://forum.notebookreview.com/lenovo-ibm/474396-fn-ctrl-swap-all-lenovo-laptops-solved.html

If I ever make a lot of money I will contract out hitmen to track down and execute those responsible for going against such well established standards.

like image 44
fostandy Avatar answered Oct 05 '22 12:10

fostandy