Posted By

kmallea on 04/30/10


Tagged

alt keyhandlers atrl


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

TrentSkunk
socialflasher
donaldleegraham


Key handlers (ctrl alt combos)


 / Published in: ActionScript 3
 

URL: Key Handlers

Key handlers for ctrl alt combos

  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. }

Report this snippet  

You need to login to post a comment.