Jump to content

CTRL getting stuck


 Share

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...