I have Ubuntu 12.04 running in a Virtual Box virtual machine, on my Windows 7 32bit system. It has been working great, except that the backtick/tilde button sticks(not physically).

When I hit the backtick button it keeps repeating until another input button is pressed. So if I press the spacebar while the backtick is repeating, it stops, but if I press the shift while it is repeating, the backtick turns into a tilde, and the tilde keeps repeating until I release the shift key (at which point it's a backtick again and keeps repeating).

This sticking behavior only happens with the backtick key, and only in my Ubuntu virtualization, never in windows.

I've tried both my laptop's keyboard and an external USB keyboard and the problem happens on both. Both keyboards I've tried are Japanese 106/109 key layout, but I'm using them with a English(US) 101 profile. When I refer to the backtick key above, I mean where it is on the US layout.

If I use the Japanese profile, the key in that location (the US backtick location) still sticks, but its no longer mapped as the backtick key.

Any thoughts as to what might be causing this and possible solutions?

I've searched a lot, but have not found any help so far. Any help is greatly appreciated.

Additional Info: I booted Linux from a USB key, and found it did not have this stuck key problem. So it appears to be something with Virtual Box.

  • Have you installed guest additions for virtual box? – Evandro Silva Sep 26 '12 at 1:44
  • yes... installed and seem to be working with no problems – Scott Lemmon Sep 26 '12 at 2:42
  • 1
    I have seen this repeating backtick behavior before! It was happening in VirtualBox image that I had which was on Ubuntu 11. I also have Japanese input methods configured, so that could be a clue. Speaking of Japanese input, Japanese keyboards have an IME switching key where the backtick normally is. – Kaz Apr 3 '13 at 16:46
  • Interesting. What was the physical layout of your keyboard at the time? – Scott Lemmon Apr 9 '13 at 2:47

I know about this problem. I have a Windows laptop bought in Japan and have run into the sticking tilde key issue.

As you know, the tilde key is used in Japanese windows for Japanese-oriented IME switching, and Japanese keyboards contain markings on the key to that effect.

I have drilled into the issue somewhat, but lost motivation. A summary of my meagre findings is basically this:

  • VirtualBox, in the virtual machine window, does not capture ordinary Windows WM_KEY events. Rather, it registers a low level keyboard hook. Look for occurences of LowLevelKeyboardProc in this VirtualBox source file.

  • I suspect that in Japanese Windows, due to its special role, the tilde key does not generate an up event when the key is released. Since VirtualBox needs to make a faithful simulation of scan codes to the virtualized system, it looks like tilde is being held down.

  • Though I've been able to monitor events flowing into VirtualBox windows using Spy++, the low level ones cannot be seen. The VirtualBox configuration UI has normal key events flowing into it, but the machine windows, absolutely nothing. Even the UI hot keys for VirtualBox itself (not destined for the machine) are all handled through that low level hook, it seems.

So testing this hypothesis would require writing a sample program which intercepts the keyboard events in the same way and shows that there is no matching "up" for a "down" for the tilde key. Though I have Visual Studio kicking around, and it's not complicated, it's just too much effort for this silly problem.

Anyway, in spite of the incomplete investigation, I place a low probability on the notion that this is an Ubuntu issue.

  • That makes a lot of sense, and it seems we both agree that it is most likely a small Virtual Box bug related to a particular system setup. Marking as answered. – Scott Lemmon Apr 11 '13 at 7:12

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.