#IfWinActive ahk_class CabinetWClass ; Explorer ^z:: #IfWinActive ahk_class ExploreWClass ; Explorer (legacy) ^z:: #IfWinActive ahk_class Progman ; Desktop ^z:: #IfWinActive ahk_class WorkerW ; Desktop shown by Win+D ^z:: MsgBox Ctrl+Z shortcut for files and desktop has been disabled, use the undo button instead. return #IfWinActive