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