Using a text key with numpad

Get help with using AutoHotkey and its commands and hotkeys
Posts: 1
Joined: 19 Jul 2018, 10:59

Using a text key with numpad

19 Jul 2018, 11:34


Been trying to get my numpad keys to produce numbers, but without Num Lock turned on. Used a text key (R) as a hotkey, while trying to retain its original function. (Using usual hotkeys like alt, ctrl is not an option.)


Code: [Select all] [Download] GeSHi © Codebox Plus

~r & NumpadIns::   Send, 0

but it gives me r0 :-(

Is there any way to achieve the following behaviour:

• Once the text key (R) is pressed and then released, it still gives R.
• But when it's pressed, held and then followed by a numpad key, it gives the number.
• While the text key is still held, the system, if needed, would receive other key inputs like space, dot, comma, etc.

I realize it's a noob question (that's what I am to AHK). Sorry if such question has been asked here already. Would greatly appreciate any help. Thanks in advance!
Posts: 1190
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Using a text key with numpad

20 Jul 2018, 01:28


Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

R or r is written after the r key is released,
since the script must wait to see whether another key is pressed in addition.

Return to “Ask For Help”

Who is online

Users browsing this forum: Google [Bot], nonvenomous and 54 guests