Code: Select all
~LAlt & ~g::MsgBox % A_ThisHotkey
#If WinActive("ahk_class Notepad")
~LAlt & ~t::MsgBox % A_ThisHotkey
#If !WinActive("MozillaWindowClass")
!+t::MsgBox % A_ThisHotkey ; This hotkey doesn't work
Changes to global hotkey works fine:
Code: Select all
~LAlt & ~g::MsgBox % A_ThisHotkey
~LAlt & ~t::
If WinActive("ahk_class Notepad")
MsgBox % A_ThisHotkey
Return
!+t::
If !WinActive("MozillaWindowClass")
MsgBox % A_ThisHotkey
Return