24

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.

1
  • is there a way to do this in Ubuntu 14.04 ? – Louis Feb 3 '15 at 10:54
35

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.

3
  • This just saved me a ton of time... thank you! – Isaac Gregson Oct 6 '15 at 19:14
  • This works perfectly on my yoga 500. – nilsmagnus Feb 23 '16 at 19:31
  • This is the correct answer in my case. Thanks! – Brylie Christopher Oxley Oct 6 '17 at 8:12
6

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.

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.