Jump to content
Sign in to follow this  
Christopher Blue

Hotkeys and modifier keys

Recommended Posts

Christopher Blue

I have noticed that if I have say, "E" set as a hotkey and I have the hotkey function spit back the key:

Func FunctionE
  HotKeySet("E", "FunctionE")

Then if I go to hold down shift to type "HELLO" then instead I get "HEllo". How can I avoid this?

Also, is there a way to detect if a modifier key is being held down at any given time?

Share this post

Link to post
Share on other sites

#include <GUIConstants.au3>
#include <misc.au3>
$Form1 = GUICreate("AForm1", 250, 65, 193, 115)
$Label1 = GUICtrlCreateLabel("ALabel1", 112, 24, 200)

While 1
    While (_IsPressed('5B'))
        GUICtrlSetData($Label1, "Left Windows Key is being held down...")
    GUICtrlSetData($Label1, "Left Windows Key is not being held down!")
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE


There's an example of checking if a modifier key was pressed/held down..

Check the help file for: _IsPressed()

Edited by CHRIS95219

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.