Skip to content

Instantly share code, notes, and snippets.

@destroytoday
Created December 17, 2010 07:20
Show Gist options
  • Save destroytoday/744603 to your computer and use it in GitHub Desktop.
Save destroytoday/744603 to your computer and use it in GitHub Desktop.
var hotkeyManager:HotkeyManager = new HotkeyManager(stage);
// use-case with handlers
hotkeyManager.createHotkey("@").executed.add(lookupUserHotkeyHandler);
hotkeyManager.createHotkey("command+s").executed.add(saveHotkeyHandler);
// use-case with commands
signalCommandMap.mapSignal(hotkeyManager.createHotkey("@").executed, lookupUserCommand);
signalCommandMap.mapSignal(hotkeyManager.createHotkey("command+s").executed, saveCommand);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment