moi.command.registerCommandSpecificShortcutKey( "Ctrl+Z" ); moi.ui.commandDialog.waitForEvent(); e = moi.ui.commandDialog.event; if ( e == 'Ctrl+Z' ) DoSomething();