Page 1 of 1

Sending a scan code with NumLock ON

Posted: 20 Aug 2019, 10:47
by Groot
Hi, :-)

With the following extremely simple script,

Code: Select all

a::
	SendInput {Blind}{SC030} ;SC030 = b
	Return
c::
	SendInput {Blind}{SC04B} ;SC04B = Numpad4/NumpadLeft
	Return
When I press a,
if CapsLock is OFF, AHK sends b.
if CapsLock is ON, AHK sends B.
This is exactly what I am expecting.

Now, when I bress c,
if NumLock is OFF, AHK sends Left.
if NumLock is ON, AHK sends Left as well.
In this last case with NumLock ON I would expect AHK to send 4, not Left, since I am specifying a scan code but not a virtual key.
Why is that?

Thank you. :-)