Jump to content

Help: how to detect key held down regardless of input.


Recommended Posts

Hi, this is what I have currently. It's intention is to turbo press "I" key.

#include <Misc.au3>
#include <AutoItConstants.au3>

#requireadmin


$hDll = DllOpen("user32.dll")

While 1
    If _IsPressed("49", $hDll) Then
            Send("i")
    EndIf
    Sleep(100)
WEnd

Func OnAutoItExit()
    DllClose($hDll)
EndFunc

It works fine when I only hold down "I", but if I hold down "I" and then "L" key, it no longer Send "i".

However if I hold down "L" key, then "I" key, it will turbo press "I".

Is there a way to keep sending "I' as long as I is held down, regardless of the order of I'm pressing ?

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...