0

I'm interested in hijacking the Fn key on my laptop and using it as the mod key for tmux, but after a bunch of tinkering with xmodmap and tmux.config, I'm not much further along in getting this to work.

  • xev shows that they key name is XF86WakeUp, but this doesn't work as a key in tmux.config.
  • I've tried setting the hex code for XF86WakeUP (0xF8) in tmux, but this doesn't work either.
  • I know that the Fn key sending its own code is something of a fluke, but it's a fluke I'd like to take advantage of now and worry about the consequences later (it's a valuable key in a valuable space!)
3

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. It 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.

(Source)

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.