The Code:
myTextField.addEventListener(KeyboardEvent.KEY_DOWN, KeyDownFunc);
function KeyDownFunc(event){
- if(event.keyCode == Keyboard.ENTER){*
-
trace("Enter");*
- }*
*}
***The Problem:
**
I have Control>Disable Keyboard Shortcuts turned on, but Flash is not recognizing when I hit the Enter key. Hitting Ctrl+Enter works, but Enter does not. I have tried applying the same event listener to the stage and it works, but I need it applied myTextField. I have tried publishing it, uploading it to deviantart and testing it in-browser and the behavior remains the same (for this test I used a dynamic text field test.text=“Enter”; since you can’t use trace for that kind of test). It works for Ctrl+Enter but not Enter.