| View previous topic :: View next topic |
| Author |
Message |
tinaa
Joined: 25 Nov 2004 Posts: 57
|
Posted: Sat Nov 28, 2009 11:07 pm Post subject: VirtualBox steals keys... |
|
|
Hi,
I've got Autohotkey running in Windows 7 64bit. I've got a Virtualbox virtual machine running in the background. Even though I've disabled the automatic keyboard grabbing feature for the virtual machine, for a number of hotkeys I use somehow some of the key strokes get stolen by the virtual machine instead of behaving as they should. For some reason most of the hotkeys where I've defined Windowskey+something just bring the virtual machine to the foreground and don't execute the script. And sometimes the windowskey or other modifier keys get stuck in the down state.
The only way to fix things is to reload the running scripts. If ctrl,alt or shift are stuck I need to press them physically on the keyboard to unstick them.
Is there any workaround to prevent Virtualbox from messing with Autohotkey?
Thanks. |
|
| Back to top |
|
 |
mklement
Joined: 02 Jun 2010 Posts: 3
|
Posted: Wed Jun 02, 2010 6:50 pm Post subject: |
|
|
I PARTLY have the same problem: modifier keys get stuck when I use them as part of a hotkey definition to activate a VM's window when control is returned to the host.
Here's what worked for me:
To avoid this problem, precede the VM-window-activation command in your AHK script with the following lines (the example is based on the two modifier keys *I* use for activation; adapt accordingly):
; Wait for both Control and Alt to be released before activating the VM's window.
KeyWait Control
KeyWait Alt |
|
| Back to top |
|
 |
|