Add capslock autohotkey script

This commit is contained in:
Thomas Lovén 2025-07-09 23:28:06 +02:00
parent c828dfc2e6
commit 27c2569984

28
capslock.ahk Executable file
View File

@ -0,0 +1,28 @@
#Requires AutoHotkey v2.0
SetCapsLockState "AlwaysOff"
Capslock::
{
Send "{LControl Down}"
KeyWait("CapsLock")
Send "{LControl Up}"
if ( A_PriorKey = "CapsLock" )
{
Send "{Esc}"
}
SetCapsLockState("Off")
}
::..date::
{
Send A_YYYY "-" A_MM "-" A_DD
Send A_EndChar
}
::..time::
{
Send A_Hour ":" A_Min
Send A_EndChar
}