Sending a scan code with NumLock ON

Get help with using AutoHotkey and its commands and hotkeys
Groot
Posts: 11
Joined: 28 Feb 2019, 10:51

Sending a scan code with NumLock ON

20 Aug 2019, 10:47

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. :-)

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], toralf and 69 guests