The livedocs suggest that every UIComponent has automatically set 
event listeners for keyUp (adn keyDown) events: 
http://livedocs.adobe.com/flex/2/langref/mx/core/UIComponent.html#key
UpHandler()

So, I expected that it's enough to override this method to make some 
action on key-click. But that isn't the case.. Instead - nothing 
happens.

Here's my code:

override protected function keyUpHandler(event:KeyboardEvent):void {
  super.keyUpHandler(event);
  if (event.keyCode == Keyboard.DELETE){
    mx.controls.Alert.show("Key DELETE clicked.");
  }
}

(ps. I prefer not to register key listeners by myself 
(using "addEventListener"), rather use this default behaviour if 
possible)

Reply via email to