Remap key and disable Original key Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Jadden182
Posts: 21
Joined: 08 Jan 2021, 21:10

Remap key and disable Original key

27 Oct 2021, 14:34

I am trying to block the 4 key but remap the 4 key to the letter j key. So if i press 4 nothing will happen but if i press j then it will type 4.

I understand j::4 but then i can still press the number 4 on my keyboard. Any suggestions?
User avatar
Jadden182
Posts: 21
Joined: 08 Jan 2021, 21:10

Re: Remap key and disable Original key

27 Oct 2021, 16:24

Thank you so much. If you dont mind. Can you explain the significance of the "$" and the Return in this instance? Thanks again!
User avatar
boiler
Posts: 16919
Joined: 21 Dec 2014, 02:44

Re: Remap key and disable Original key

27 Oct 2021, 16:30

The hotkey 4::return would execute the command return command and do nothing else, effectively disabling the 4 key. But then the mapped j key would also do nothing, so the $ in front of it makes the hotkey only react to physical keypresses, not virtual ones, so the mapped j does not trigger the hotkey and continues to produce a 4. See Hotkey Modifier Symbols.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Nerafius and 121 guests