TextField dispatches keyDown/keyUp as notification events.  You can’t affect 
TextField via those events.  There is a textInput event that should prevent 
changes to the TextField.

Spark text controls don’t have this problem.


On 5/16/10 10:23 AM, "[email protected]" <[email protected]> wrote:






Dear All,

I am attempting to implement hotkeys in a browser-based Flex application, 
however I'm running into a bit of a blocker - if you are in a text-field and 
you type "control+s" to save, you get a freakin' "s" in your text field!

I have tried:

- Add an event listener to the textfield and canceling it, calling 
stopPropogation() and stopImmediatePropogation()

- Doing the same on the actual textField of the TextInput (gotten by extending 
and exposing)

- Attempting to listen to the key-down of the control key and making it not 
editable (but then I found that the control key doesn't trigger a keyboard even 
unless you're on a Mac!)

Does anyone have an idea what I can do? I'm getting a bit desperate over here.

Cheers,
Julian






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui

Reply via email to