"Enter" button keyCode change in AIR3.7


not sure if bug or simple feature change?

 

i noticed soft keyboard 'enter' key returns keycode '10' instead of  traditional '13' in air3.7 on android (tested on nexus 4 & 7).

 

it means hardcoded actionscript 'keyboard.enter' no longer works button. example, won't catch 'enter' key:

 

_nameinput.addeventlistener(keyboardevent.key_up, keyup);

 

private function keyup(event:keyboardevent):void

{

          // test '13'

          if (event.keycode == keyboard.enter)

          {

               //  submitting form here etc

          }

}

 

instead, enter key add linebreak textfield.

 

my workaround detect both keycodes:

 

if (event.keycode == keyboard.enter || event.keycode == 10)

hi,

could please confirm enter key talking about. same marked in red on softkeyboard in attached image.

 

enter.png

 

regards,

nimit



More discussions in AIR Development


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account