# FMX - tabIndex interferes with on(KeyPress)

**URL:** <https://forum.kirupa.com/t/fmx-tabindex-interferes-with-on-keypress/74121>\
**Category:** flash\
**Created:** [December 23, 2004, 10:57pm UTC](https://forum.kirupa.com/t/fmx-tabindex-interferes-with-on-keypress/74121 "2004-12-23T22:57:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![borispc](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@borispc](https://forum.kirupa.com/u/borispc)\
**Post date:** [December 23, 2004, 10:57pm UTC](https://forum.kirupa.com/t/fmx-tabindex-interferes-with-on-keypress/74121/1 "2004-12-23T22:57:11Z")

</div>

Hello Kirupa Inhabitants!

Let’s see if anyone has encountered this before…  
I have several input text fields in flash. For instance, email and password to login. I also have a button that responds to the Enter key (to submit the data). Everything works perfectly until I use the tabIndex property in ActionScript. The moment I define those 2 text fields as tab Indexes the Enter Key does not execute the submit button. I can only click the button with the mouse.

I have:  
userName.tabIndex=1;  
password.tabIndex=2;

where userName and password are the text field names. TabIndex works then but not the Enter key. It’s only one or the other…

HOW CAN I MAKE TABINDEX AND THE ENTER KEY COMPATIBLE?

Thank you fellow kirupians…you’re help is always useful! :tie:
