LWin::return causes capslock alwaysoff to fail

Get help with using AutoHotkey and its commands and hotkeys
Posts: 1
Joined: 03 Dec 2019, 01:57
GitHub: canadaduane

LWin::return causes capslock alwaysoff to fail

03 Dec 2019, 02:06

This works:

Code: Select all

SetCapsLockState AlwaysOff
But this doesn't:

Code: Select all

SetCapsLockState AlwaysOff
The second code block correctly causes LWin keypresses to be ignored, but it somehow also causes SetCapsLockState AlwaysOff to be ignored too--with the LWin statement, capslock incorrectly works as usual.

System: Windows 10
AHK: 1.1.32
Posts: 3972
Joined: 11 Jan 2017, 17:59

Re: LWin::return causes capslock alwaysoff to fail

03 Dec 2019, 02:59

ur SetCapsLockState AlwaysOff in the second case is never executed.
single line hotkeys return implicitly, only running whatever u put on their one single line. so if u have more code underneath, it wont get run ever.
pull the command up, above all hotkey declaration and ull probably be fine. basically, read this:

Return to “Ask For Help”

Who is online

Users browsing this forum: electrone77, JoeWinograd, pepoluan, Xtra and 62 guests