![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: Held down keys won't release Topic Summary: Created On: 11/16/2020 07:54 PM Status: Post and Reply |
|
![]() |
![]() |
- TheCyborgManatee | - 11/16/2020 07:54 PM |
![]() |
![]() |
- Edgar | - 11/17/2020 11:17 AM |
![]() |
![]() |
- monkey8 | - 11/21/2020 06:03 AM |
![]() |
![]() |
- monkey8 | - 11/24/2020 02:32 PM |
![]() |
|
I just picked up KnowBrainer and I'm running into a couple of issues. When I use the command to hold down mouse buttons (left mouse hold down, etc.), the release command doesn't appear to do anything. I have to physically click the mouse to get it to release. The same is also true if I try to use the command for holding down specific keys.
Even more strangely, when I say "shift click" (I'm assuming this is supposed to work like clicking the mouse and pressing shift at the same time, but correct me if I'm wrong), my cursor will be immediately pinned to the upper left even if my cursor is on my second monitor. It literally goes all the way across to the other monitor in the very upper left.
Has anybody else run into this problem before? It's one of the main functions I was really hoping to take advantage of, but it's obviously not working in a functional way for me. |
|
|
|
![]() |
|
when I say "shift click" […] my cursor will be immediately pinned to the upper left When first published, the Hold/Release key/button scripts had a typo error which would have caused your first problem. It sounds like your "Hold" command is working properly; just for completeness it should look something vaguely like this: Sub Main If ListVar1 = "WINDOWS Key" Then keybd_event(VK_LWIN,0,0,0)
End Sub The "Release" command should look something like this: Sub Main If ListVar1 = "WINDOWS Key" Then keybd_event(VK_LWIN,0, 2,0) End Sub Note that at the end of each line there is a series of comma separated numerals; for the "Hold" command they should all be 0s, for the "Release" command the middle should be a 2. Type POINT x As Long End Type Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINT) As Long Sub Main Dim z As POINT GetCursorPos z 'Get cursor's current Coordinates End Sub Note that, for me, the line which starts out with "Declare Function" and ends with "As Long" is all on one line; if it is broken up all but the last line must end with a "_". Also, the word POINT might be different in your version but it doesn't matter as long as it is consistent in all three locations in the code. ------------------------- -Edgar |
|
|
|
![]() |
|
In terms of "shift click" try saying "press shift left click", likewise "press control left click", these commands are already built into Dragon.
In terms of holding down mouse buttons keys, the commands should work in KB "left mouse hold down", "left mouse release". If not I suggest contacting Lunis who may arrange a remote connection if necessary.
In terms of the "shift click" command in KB, I just looked at it and the SendKeys implementation does not work so you could change the command to the following:
' www.pcbyvoice.com ' Declare keyboard events Windows API function Declare Function keybd_event Lib "user32.dll" (ByVal vKey As _ Long, bScan As Long, ByVal Flag As Long, ByVal exInfo As Long) As Long ' declare virtual key constant for the shift key Const VK_CTRL = &h11 Const VK_SHIFT = &h10 Sub Main 'hold down the shift key keybd_event(VK_SHIFT,0,0,0) Wait 0.1 ButtonClick 1,1 Wait 0.1 'release the shift key keybd_event(VK_SHIFT,0,2,0) End Sub
or alternatively you can HeardWord the built in Dragon commands.
EDIT: one other very important item here is if you issue the commands "control key hold down" or alternatively "shift key hold down" these will conflict with the hotkeys for Dragon for forcing dictation and commands. You need to change the hotkeys to something like "{Ctrl+Shift}" and "{Alt + Shift}" ------------------------- |
|
|
|
![]() |
|
I just had another look at this with the existing KnowBrainerCommands set and there is a problem with the "<Keyname> Release>" command which is not obvious to see. If you open the command and then delete all the contents in the editor and replace with the following it should then work fine. It will be fixed with the next command set release, KB update.
' Script Lindsay Adam 2010 www.pcbyvoice.com ' Declare keyboard events Windows API function Declare Function keybd_event Lib "user32.dll" (ByVal vKey As _ Long, bScan As Long, ByVal Flag As Long, ByVal exInfo As Long) As Long ' declare virtual key constant for the left Windows key, ' control key, shift key and alt key Const VK_LWIN = &h5B Const VK_CTRL = &h11 Const VK_SHIFT = &h10 Const VK_ALT = &h12 Const VK_SPACE = &h20 Sub Main If ListVar1 = "WINDOWS Key" Then keybd_event(VK_LWIN,0,2,0) If ListVar1 = "CONTROL Key" Then keybd_event(VK_CTRL,0,2,0) If ListVar1 = "SHIFT Key" Then keybd_event(VK_SHIFT,0,2,0) If ListVar1 = "ALT Key" Then keybd_event(VK_ALT,0,2,0) If ListVar1 = "SPACE Key" Then keybd_event(VK_SPACE,0,2,0) End Sub ------------------------- |
|
|
FuseTalk Standard Edition v4.0 - © 1999-2021 FuseTalk™ Inc. All rights reserved.