Key handlers (ctrl alt combos)


/ Published in: ActionScript 3
Save to your folder(s)

Key handlers for ctrl alt combos


Copy this code and paste it in your HTML
  1. stage.addEventListener(KeyboardEvent.KEY_DOWN, hiddenKeysDown_handler);
  2. stage.addEventListener(KeyboardEvent.KEY_UP, hiddenKeysUp_handler);
  3.  
  4. //Key Handlers
  5. private function hiddenKeysDown_handler(e:KeyboardEvent):void{
  6. if (e.ctrlKey && e.shiftKey && e.altKey) {
  7. // do something
  8. }
  9. }
  10.  
  11. private function hiddenKeysUp_handler(e:KeyboardEvent):void{
  12. //stop doing something
  13. }

URL: Key Handlers

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.