Ooker
Ooker

Reputation: 3054

Why doesn't Shift + Numlock work, even though there is +NumLock::NumLock?

I have this:

NumLock::CapsLock
+NumLock::NumLock

However Shift + Numlock doesn't work, even though I put it in a standalone script, and run in safe mode, with the newest version. Using this works:

+NumLock::SetNumLockState, % GetKeyState("Numlock", "T") ? "Off" : "On"

It used to work before. Do you know how to debug this?

Upvotes: 0

Views: 209

Answers (1)

0x464e
0x464e

Reputation: 6499

I don't know why exactly your above code doesn't work. Maybe experimenting with different send modes could reveal the answer, but you can just use SetNumLockState.

NumLock::CapsLock
+NumLock::SetNumLockState, % !GetKeyState("Numlock", "T")

GetKeyState("Numlock", "T") gets the current logical state of the numlock key, and it's reversed with the ! operator.

Upvotes: 0

Related Questions