Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a VMware machine which has got trapped thinking that Alt is down - so trying to type results in activating menu functions like save etc. How can I return it to reality?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

If the operating system is Windows, you can use AutoHotkey to force keys to be released:

Send, {Shift Up}
Send, {LShift Up}
Send, {RShift Up}
Send, {Alt Up}
Send, {LAlt Up}
Send, {RAlt Up}
Send, {Control Up}
Send, {LControl Up}
Send, {RControl Up}
Send, {LWin Up}
Send, {RWin Up}
ExitApp

Documentation:

share|improve this answer
  • The VMware Knowledge Base Entry on the topic recommends to press the stuck keys individually, inside the VM. However, this doesn't always work (it didn't work for me today).
  • You can also try holding the keys down as you grab the input into the virtual machine, then releasing them. This too doesn't always work.
  • In the case of the above not working, you will have to convince the guest operating system to change them:
    • On Windows, go to the Accessibility Options (sometimes known as Ease of Access Center) in the Control Panel, and enable StickyKeys. This will turn Ctrl, Alt and Shift on and off with each keypress, rather than when held down. Press the stuck key until it is in the off state, then turn off Sticky Keys again. (Note: you can also turn StickyKeys on by pressing Shift five times in a row in the default setup)
    • On a Linux OS, this advice may help
share|improve this answer

Assuming you are running Windows, this question is relevant whether you are running it as a guest OS in a VM or not. The AHK script suggested by iglvzx is relevant in principle; but it may not help if the problem prevents you from being able to execute it. I suggest the following script:

; The following command will normally cure a stuck modifier key.  The hotkey
; uses all 4 modifiers because this is the only combination that is guaranteed
; to work if any of them (without knowing which) is/are logically stuck.  
^+#!m::                               ; Control-Shift-Windows-Alt-M
  Send, {Shift Up}
  Send, {LShift Up}
  Send, {RShift Up}
  Send, {Alt Up}
  Send, {LAlt Up}
  Send, {RAlt Up}
  Send, {Control Up}
  Send, {LControl Up}
  Send, {RControl Up}
  Send, {LWin Up}
  Send, {RWin Up}
  MsgBox 0, Stuck Modifier,  Fix ran., 1
  Return

You can put the script in a .ahk file and put a shortcut to it in your Startup folder so that it will always be available in case of 'emergency'. If you don't like seeing the AHK tray icon for it, add a line with #NoTrayIcon at the beginning. If you don't like the brief confirmation that the script ran, you can delete that MsgBox line.

share|improve this answer

Your Answer

 
discard

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.