myndzi Posted October 2, 2008 Share Posted October 2, 2008 (edited) I added these hotkeys: HotKeySet("^{LEFT}", "wScrollLeft") HotKeySet("^{RIGHT}", "wScrollRight") HotKeySet("^{UP}", "wScrollUp") HotKeySet("^{DOWN}", "wScrollDown") HotKeySet("^{PGUP}", "wZoomIn") HotKeySet("^{PGDN}", "wZoomOut") With code like this: Func wScrollLeft() If WinActive("Wilcom ES-65 Designer") Then ControlSend("[ACTIVE]", "", 59904,"{LEFT}") Else HotKeySet("^{LEFT}") Send("^{LEFT}") HotKeySet("^{LEFT}", "wScrollLeft") EndIf EndFunc The problem is that if I use RCTRL + arrow, as is my habit, CTRL gets stuck in the "down" state when I use it anywhere but the target application. I tried adding {CTRLUP} or {RCTRL} to the Send sequence in hopes of unsticking it, but with no luck. Is anyone familiar with this, and/or is there a workaround? A google search showed me an archived thread about a dll for hooking the keyboard, but I didn't see where to obtain it. What I really want is to bind the hotkey only for the specified application, or at least to not "eat" the keypresses for other apps. If someone knows how to do one of these, that's even better. Thanks. Edited October 2, 2008 by myndzi Link to comment Share on other sites More sharing options...
NELyon Posted October 2, 2008 Share Posted October 2, 2008 http://www.autoitscript.com/forum/index.ph...st&p=512706It's a common problem. There is a semi-workaround in that post. Link to comment Share on other sites More sharing options...
myndzi Posted October 3, 2008 Author Share Posted October 3, 2008 (edited) http://www.autoitscript.com/forum/index.ph...st&p=512706It's a common problem. There is a semi-workaround in that post.Ugh, thanks. I read the FAQ post but not the whole thread Edit: This helps but the solution is non-optimal. If you use ctrl+arrows when editing text you will know what I mean. What about the not "eating" the keypresses angle? Is there any way to achieve this, so I can "leave alone" the keypresses when they aren't in my target application? Edited October 3, 2008 by myndzi Link to comment Share on other sites More sharing options...
myndzi Posted October 3, 2008 Author Share Posted October 3, 2008 It looks like http://www.autoitscript.com/forum/index.ph...=55694&st=0 that code might do it, but I'm unsure how to stop the keypresses from going through to my target in this case. Would I just not call the next hook? Argh. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now