Capture CTRL+N or CMD+N


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



Copy this code and paste it in your HTML
  1. stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown);
  2.  
  3. private function keyDown(e:KeyboardEvent) :void
  4. {
  5. if(e.commandKey || e.ctrlKey)
  6. {
  7. switch(e.keyCode)
  8. {
  9. case Keyboard.N:
  10. // do stuff
  11. break;
  12. }
  13. }
  14.  
  15. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.