-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process Win32 input events through Natlink when possible #372
Comments
I have got the Incidentally, this interface may be used in conjunction with WSR, or sphinx, as long as Natlink is available and DNS is running; it is not tied to the Natlink engine. Since 32-bit Python is required for Natlink, it can't be used directly with Kaldi. |
This interface doesn't work well with modifier keys and is therefore unsuitable as an alternative to SendInput. I'll mention the Natlink |
Since the work on this is complete, I might just add it as a disabled feature with caveats mentioned in the docs. Better to include my implementation than to refer to the hard-to-use Natlink function. Some may find this feature useful despite the caveats. |
Re: #372. Natlink's `playEvents' function can be used to simulate keystrokes and mouse events with Dragon NaturallySpeaking. Dragonfly's Key, Text and Mouse action objects are now able to send events this way, allowing Dragonfly commands to interact with administrative applic- ations on Windows. This feature is disabled by default because the `playEvents' inter- face is not a perfect substitute for the Windows `SendInput' funct- ion. Dragonfly falls back on the default implementation if Natlink cannot be used. Documentation on this feature has been added in the relevant files.
This feature is now ready on the master branch. @quintijn, you may find this interesting. |
Thanks Dane, good to know. I agree that your Keys and Text (and also Mark Lillibridges sendkeys functions, which are now in the dtactions repository) are more easy, and can also be used when Dragon is not running, so also for other applications (as I happen to have). |
No worries, Quintijn. I can't take credit for the Key and Text actions though. Christo Butcher wrote those. BTW, this feature uses a sort of replacement sendinput module: natlinkinput.py. It is not dependent on Dragonfly. I have no objection to it being used in dtactions, if that is desirable. |
Re: #11.
It occurs to me that most Dragonfly
Key
,Text
andMouse
actions could be processed using the special natlinkplayEvents()
function. Because DNS itself would "play" the events, this would allow indirect interaction with applications running in elevated mode.This feature could either be optional or always used if the natlink module is available and DNS is running.
Assuming the documentation for
playEvents()
is complete, the following events can not be processed:Dragonfly
canwill have to fallback on its own SendInput implementation for these.I do have hope, however, that the function may be used to type these events anyway; the accepted tuples are simply window message pairs (wParam and lParam) defined by Windows.As is the case with DNS itself, this won't allow interaction with the UAC box.
The text was updated successfully, but these errors were encountered: