Code: Select all
~CapsLock:: {
ToolTip(GetKeyState("CapsLock", "T") ? "On" : "Off")
}
~CapsLock Up:: {
ToolTip(GetKeyState("CapsLock", "T") ? "On" : "Off")
}
Code: Select all
~CapsLock:: {
SetTimer(() => ToolTip(GetKeyState("CapsLock", "T") ? "On" : "Off"), -50)
}
~CapsLock Up:: {
SetTimer(() => ToolTip(GetKeyState("CapsLock", "T") ? "On" : "Off"), -50)
}
Although this met my expectations, I can't help but wonder, is this delay fixed? Does the required wait time differ on different PCs based on performance? In different environments, does AHK always faster than the CapsLock state actually change? When using Hotkeys, will it always get the state before the change occurs? Can I simply invert the states, treating "On" as "Off" and "Off" as "On" to ensure it works correctly without issues?