Sign in to follow this  
Followers 0

Keyboard Events

2 posts in this topic

#1 ·  Posted (edited)

I'm rather new to AutoIt, and I was wondering if there was a way to detect keyboard events in the current version (v3). Right now I need to be able to detect the up and down status of a key, and from what I can tell you can't do it in AutoIt -- except for the HotKeySet function. Problem with HotKeySet is that it only allows 64 definitions, no way of checking KeyUp and KeyDown, does not detect key modifiers, so it's not what I want. If AutoIt is incapable of doing this, would anyone like to teach me how to do it in C++/C (or even do it for me :) )? Thanks for your time.

- John

Edited by Crashed

Share this post

Link to post
Share on other sites


maybe have a look at _isPressed()

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1
    Sleep ( 250 )
    If _IsPressed("26", $dll) Then
        MsgBox(0,"_IsPressed", "End Key Pressed")

So long,


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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