Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

However, there are two programs in which I don't want the joystick remapped.

How can I modify my script to prevent autohotkey from remapping the joystick in these programs, so that I don't have to manually do it?

share|improve this question

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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