Sign in to follow this  
Followers 0
myndzi

CTRL getting stuck

4 posts in this topic

#1 ·  Posted (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 by myndzi

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

http://www.autoitscript.com/forum/index.ph...st&p=512706

It'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 by myndzi

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0