Jump to content

Bind right shift to something


tufflax
 Share

Recommended Posts

Hey!

I read that the shift buttons can not be used as hotkeys (the documentation for HotKeySey). My problem is that I want a script that does just that---binds a function to shift.

You see, I want the script to pop-up an annoying alert window when the right shift button is pressed, because I want to learn to use left shift instead. I think using the right shift is a bad habit of mine.

Can this be done with autoit? If not, can you recommend any way of doing it with any other language or software?

Link to comment
Share on other sites

Using _IsPressed might be more up your alley.

#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1
    Sleep ( 250 )
    If _IsPressed("A1", $dll) Then
        MsgBox(0,"Right Shift Key", "Stop using me!!")
    EndIf
WEnd
DllClose($dll)
Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic]
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...