Sign in to follow this  
Followers 0
Aro2220

My Shift and Control keys get stuck sometimes during scripts

2 posts in this topic

I have a script that remaps part of my keyboard:

#Include <Misc.au3> 

HotKeySet("E", "EKey")

Func EKey()
Send("{BACKSPACE}")
Send("=")
Send("-")
Send("7")
Send("-")
EndFunc

$dll = DllOpen("user32.dll") 
While 1     
    Sleep (10)     
        If _IsPressed("57", $dll) Then         
            Send("{, down}")         
            Send("{. down}")         
            While _IsPressed("57", $dll)             
                Sleep(10)         
            WEnd         
            Send("{, up}")         
            Send("{. up}")     
        EndIf 
WEnd

It works great 99% of the time. However, sometimes after using certain combinations the shift or control or alt keys will get stuck down.

I think it's because I have some hotkeys that are like Send("!\") in other hotkey'd functions. Is there some proper way to use the ! ^ and + send controls so that they don't screw up and hold down the shift/alt/control keys so you have to mash them on your keyboard to get them to unstick?

Share this post


Link to post
Share on other sites



Hi,

just at the top of website, FAQ from BrettF might helps you:

http://www.autoitscript.com/wiki/FAQ#Why_does_the_Ctrl_key_get_stuck_down_after_I_run_my_script.3F

;-))

Stefan

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