SendInput keys missing.
Posted: 8. Sep 2013, 05:21
I'm running VirtualBox 4.2.16 on Windows 7. I'm trying to use Dragonfly, a Python plug-in for Dragon NaturallySpeaking 12/NatLink. Unfortunately, this program uses SendInput to send key up-and-down events to the application in focus. It works as expected with Notepad, for example, but with a VirtualBox guest sometimes keystrokes will be missing. I have noticed this most often with the shift key.
By way of verification, I tried to replicate the behavior with AutoHotkey. I used the following script in my tests, but regardless of which line I uncommented the script did not produce input with VirtualBox. In the case of SendInput and SendEvent this script did work with Notepad. I used the AutoIt3 Window Spy utility that comes with AutoHotkey to determine the window class of the VirtualBox guest.
#IfWinActive ahk_class Notepad
space::
#IfWinActive ahk_class QWidget
space::
;SendInput if{space}(){enter}{{}{enter}
;SendPlay if{space}(){enter}{{}{enter}
;SendEvent if{space}(){enter}{{}{enter}
return
Is there a way to fix this behavior? I would like to verify that there is no error on my end before contacting the developers.
Thanks.
By way of verification, I tried to replicate the behavior with AutoHotkey. I used the following script in my tests, but regardless of which line I uncommented the script did not produce input with VirtualBox. In the case of SendInput and SendEvent this script did work with Notepad. I used the AutoIt3 Window Spy utility that comes with AutoHotkey to determine the window class of the VirtualBox guest.
#IfWinActive ahk_class Notepad
space::
#IfWinActive ahk_class QWidget
space::
;SendInput if{space}(){enter}{{}{enter}
;SendPlay if{space}(){enter}{{}{enter}
;SendEvent if{space}(){enter}{{}{enter}
return
Is there a way to fix this behavior? I would like to verify that there is no error on my end before contacting the developers.
Thanks.