Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
is there a way to do this in Ubuntu 14.04 ? – Louis Feb 3 '15 at 10:54

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.

share|improve this answer
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 at 19:31

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|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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