Search the Community
Showing results for tags 'keyboard input'.
-
I have a USB and a PS2 keyboard hooked into my computer. Windows 7 Pro x64 AutoIT 3.3.14.5 -- Code Removed due to Keylogger rules of Forum -- The code ran "_isPressed" in a loop and wrote to the console the key pressed. Every so often _isPressed outputs multiple random stuck keys to console. When I open a text editor however NO keys are being sent. Why is this occurring and is it a concern?
-
How can I limit keyboard input to this GUI?
timmy2 posted a topic in AutoIt General Help and Support
A graphic is already on screen showing the meanings of the following keys: j, k, l. At the point when that graphic appears I want my script to then wait for the user to press any of those keys. My script will respond appropriately. I found an old post by zackrspv that led me to the following script. My question is: how can I limit keyboard input to this GUI? I don't want the user's keystrokes to be seen by any other program that might be running. I cannot figure out how to incorporate the BlockInputEX UDF into my script, plus I'm not sure my approach is even the best solution. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $form = GUICreate("test", 500, 500,BitOR($WS_SYSMENU,$WS_POPUP)) $SBack = GUICtrlCreateDummy() $SPause = GUICtrlCreateDummy() $SForward = GUICtrlCreateDummy() Dim $AccelKeys[3][2] = [["j", $SBack],["k", $SPause],["l", $SForward]] GUISetAccelerators($AccelKeys) GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $SBack ConsoleWrite("back" & @CRLF) Case $SPause ConsoleWrite("pause" & @CRLF) Case $SForward ConsoleWrite("forward" & @CRLF) EndSwitch WEnd