Most folks use keyDown. Why are you using keyUp? KeyUp should still work
for IFocusManagerComponent. When does it not work?
Not sure why I picked keyUp... keyDown does work as well... But this is a really easy problem for me to reproduce. Running the following application... If I implement the IFocusMangerComponent interface, keyDown is called, but tabbing doesn't work. If I don't, keyDown isn't called, but tabbing works.
<?xml version="1.0" encoding="utf-8"?>
override protected function keyDownHandler(event:KeyboardEvent):void
if (event.ctrlKey && event.keyCode == Keyboard.S)
label.text = "Save Detected";
<s:Label id="label" />
A container (like the app) should not normally be an IFocusManagerComponent
because it should never really have focus, its children like the TextInputs
Keyboard events bubble, so once a TextInput has focus, they keyDownHandler
should be called in the application.
If nothing has focus, keyboard events are dispatched from the stage, so you
may also need to listen there.
Ah, makes sense. Is adding/removing the stage event listener in added_to_stage/removed_from_stage the best way to implement this and avoid a memory leak?
I use a weak reference listener to systemManager.stage during app