Jump to content

CTRL stuck after Send


Recommended Posts

This is what I'm trying to do: In Firefox, if you hold down CTRL + C for about 200ms, then press CTRL + T. This is my code:

While WinActive(" - Mozilla Firefox")
        If _IsPressed("A2", $hDLL) And _IsPressed("43", $hDLL) Then
            $timer = TimerInit()
            While _IsPressed("A2", $hDLL) And _IsPressed("43", $hDLL)
                Sleep(10)
                $diff = TimerDiff($timer)
                If $diff > 200 Then
                    Send("^{T}")
                    While _IsPressed("A2", $hDLL) And _IsPressed("43", $hDLL)
                        Sleep(10)
                    WEnd
                EndIf
            WEnd
        EndIf
    WEnd

The problem is that the CTRL key gets stuck down after Send("^{T}"). I found this, but what I understand that happens when I release, and that is not what I want. The "General unstuck method" did nothing.

Link to comment
Share on other sites

  • Developers
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

×
×
  • Create New...