0
votes

I am working on one enterprise app. In that, I need to open one popup on one shortcut key, which is the combination of Alt+AnyCharKey.

So when I press that key with Alt, for different char keys, different numbers or characters is typed in TextInput.

Suppose If I press Alt+A, it prints 1 in TextInput. So problem is, when I capture the shortcut key and opens a popup and by setting focus on TextInput of that popup, that number is typed in TextInput.

So how can I disable that Alt+Key combination in TextInput ???

1
Is this going to be an AIR app? If not, Alt+___ shortcuts will often activate browser shortcuts before flash gets ahold of them, you may run into an issue there. - Sam DeHaan

1 Answers

0
votes

Simple preventDefault on keyDown should help, I think

protected function textinput_keyDownHandler(event:KeyboardEvent):void
{
    if (event.altKey)
        event.preventDefault();
}