LWin::return causes capslock alwaysoff to fail

Get help with using AutoHotkey and its commands and hotkeys
canadaduane
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

LWin::return
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
swagfag
Posts: 3086
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:
https://www.autohotkey.com/docs/Hotkeys.htm#Intro
https://www.autohotkey.com/docs/Scripts.htm#auto

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], dave444344, Google [Bot], Groot, spencer and 223 guests