Why does my F12 key turn into a tilde key sometimes?

5

I'm using Ubuntu, Yakuake, and VMWare Server 2. I've left Yakuake with the default F12 hotkey, and it's worked perfectly for months. I recently started using VMWare Server 2 to run a couple of Ubuntu VMs, and sometimes, after starting one of those VMs and working with it, the F12 key stops working to drop down the Yakuake console.

Currently, the F12 key doesn't do anything in my browser. If I'm in Emacs I get a notification that: "<f12> is undefined", and in terminals it inputs a tilde (~). I've not been able to recover the Yakuake functionality without restarting the machine.

Andrew Larned

Posted 2010-08-30T16:09:58.900

Reputation: 197

Answers

0

VMWare is notorious for having problems with keycode mapping in Linux. The defaults work fine with many normal applications, but things get tricky when you use non-character keys.

VMWare has published an exhaustive explanation of the reasons why these problems exist. The link is for VMWare Workstation, but I successfully used it to solve my own problems with VMWare Server a few years back.

The possibly quick solution:

If your keyboard works correctly with a local X server, and you just want the same behavior with a remote X server (which is also an XFree86 server running on a PC), just power off the virtual machine and close the VMware Workstation window, then add the line

xkeymap.usekeycodeMapIfXFree86 = true

to the virtual machine configuration file or to ~/.vmware/config. Make this change on the host machine, where you run the virtual machine, not on the machine with the remote X server.

If you are using an XFree86-based server that VMware Workstation does not recognize as an XFree86 server, use this instead:

xkeymap.usekeycodeMap = true 

If these changes do not work or cause more problems, you can also try:

xkeymap.nokeycodeMap = true

And if none of this works, you'll need to go to the link and figure out what to do in detail. The following line MAY work, but try this last because the other solutions are more general and may fix problems you don't even realize you're having.

xkeymap.keycode.88 = 0x58

Cliff

Posted 2010-08-30T16:09:58.900

Reputation: 164

I've moved on from both Ubuntu 10.04 and VMWare in the last two years, but your answer looks like it would give me somewhere to go. I'll accept it unless/until someone suggests something better, or that this doesn't work. – Andrew Larned – 2012-12-18T16:37:03.740