"Enter" button keyCode change in AIR3.7
Not sure if this is a bug or a simple feature change?
I noticed that the soft keyboard 'Enter' key returns keyCode '10' instead of the traditional '13' in AIR3.7 on Android (tested on a Nexus 4 & 7).
It means the hardcoded actionscript 'Keyboard.ENTER' no longer works for that button. For example, this won't catch the 'Enter' key:
_nameInput.addEventListener(KeyboardEvent.KEY_UP, keyUp);
private function keyUp(event:KeyboardEvent):void
{
// test for '13'
if (event.keyCode == Keyboard.ENTER)
{
// submitting form here etc
}
}
Instead, the Enter key will add a linebreak to the textfield.
My workaround is to detect both keycodes:
if (event.keyCode == Keyboard.ENTER || event.keyCode == 10)
