The issue I am facing - alt key often gets stuck randomly. Once it gets stuck, the only way I found to get rid of it is to restart the computer.
I am not even sure if this is happening for these scripts, or if it's just a windows issue or something else. I have sticky keys turned off.
Thanks in advance.
The scripts -
Caps lock as numpad0
Code: Select all
#InstallKeybdhook
#usehook
F1::Suspend
F5::Reload
CapsLock::numpad0
Return
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
critical on
Thread, Interrupt, .00005, 2
$g:: ;left down
critical
If GetKeyState("u", "L")
SendInput {u up}
else
SendInput {g down}
return
$g up:: ;left up
critical
If GetKeyState("u", "P")
SendInput {u down}
SendInput {g up}
return
$u:: ;right down
critical
If GetKeyState("g", "L")
SendInput {g up}
else
SendInput {u down}
return
$u up:: ;right up
critical
If GetKeyState("g", "P")
SendInput {g down}
SendInput {u up}
return