I have some autohotkey settings for my joystick that are set to work everywhere.

However, there are twp programs where I don't want autohotkeys to remap the joystick.

How can I disable autohotkeys remapping for these programs in the script, so that I don't have to manually do it?

link|improve this question

65% accept rate
feedback

1 Answer

Make a couple of context-sensitive exceptions that remap your key(s) to their default setting for those two programs.

Right-click the AutoHotkey icon in your taskbar and select AutoHotkey's Window Spy to find the ahk_class of the programs you wish to ignore. The ahk_class of the active window shows in the Window Title & Class section at the top of the Window Spy.

If you have the z key remapped in the rest of your system (for example), add the following code to map it back to z in a certain app only (Notepad in this example).

#IfWinActive ahk_class Notepad ; turns on context sensitivity 
z::z ; this just maps z to itself
#IfWinActive ; turns back off context sensitivity 

More info on AutoHotkey website regarding context sensitive hotkeys: http://www.autohotkey.com/docs/commands/_IfWinActive.htm

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.