I wanna disable a key globally, say it, space,
but enable in a specific window, eg, Notepad
.
Then I put below lines in key.ahk
and load it
space::return
#IfWinActive ahk_class Notepad
space::send {space}
#IfWinActive
But below error occurs when I type space in Notepad
:
71 hotkeys have been received in last 1109 ms.
Do you want to continue?
(see #MaxHotkeysPerInterval in the help file)
seems like result in infinite recursion.
If I change
space::send {space}
to
space::space
Then nothing happens when space is typed in Notepad
.
The question is, how can I disable space globally, but enable it in Notepad
?
== EDIT ==
I do want to disable the key globally, or more usefully, remap to another key-sequence.