How to swap Ctrl and Fn on a Lenovo Thinkpad keyboard?

23,505

Solution 1

If you are using a Lenovo or Thinkpad laptop, see into BIOS/UEFI config to check whether there is a "Swap Fn and Ctrl" option in "Keyboard" section. According to the user guide, most models should have that option.

Solution 2

You are probably using a Lenovo keyboard, which reports the Fn as XF86WakeUp. Normally Fn does not register an xev event at all because it is handled by the BIOS, therefore you cannot remap it.

The fact that it is reported as XF86WakeUp gives a lot of confusion, as you can see in this bug report, but it is not really a bug, to quote comment 27 of that bug report:

It's not really a bug. Fn is the wakeup key when the machine is suspended. If anyone wants to map it to other functions, then that's okay, but being able to do that is not universal... Fn on ThinkPads and LenovoPads is a magical/special key. If only generates its own code if not combined with any of the other magic (blue highlighted) key combinations and that is more of a fluke than anything.

Share:
23,505

Related videos on Youtube

user127547
Author by

user127547

Updated on September 18, 2022

Comments

  • user127547
    user127547 almost 2 years

    I tried to exchange my Fn key with left Control, which didn't work.

    I used the command xev to get the keycodes/keysym.

    Afterwards I used:

    xmodmap -e 'keycode 151=Control_L'
    xmodmap -e 'keycode 37=XF86WakeUp'
    

    But it didn't change anything.

    I also couldn't create the .Xmodmap to change the keys there.

    Did I forget anything? It didn't throw out an error.

    • Louis
      Louis over 9 years
      is there a way to do this in Ubuntu 14.04 ?
  • Isaac Gregson
    Isaac Gregson over 8 years
    This just saved me a ton of time... thank you!
  • nilsmagnus
    nilsmagnus over 8 years
    This works perfectly on my yoga 500.
  • Brylie Christopher Oxley
    Brylie Christopher Oxley over 6 years
    This is the correct answer in my case. Thanks!