In a Flex login screen after you enter user id and password you must click on a button to invoke login. Want to be able to either click on the button or simply click the "Enter" key.
Simply add a keyboard event listener to your Login component and make sure you remove it once the login screen disappears.
Adding a keyboard event listener in AS3 is easy. All you have to remember is to add the listener for keyboard input for the entire Stage.
stage.addEventListener(KeyBoardEvent.KEY_DOWN, keyDownHandler);
The second thing to consider is another component in your application might listen to the ENTER key. So you have to remove the listener on the component once you're logged. You can listen for the show & hide events on your login component to add & remove key listeners.
In Flex, you can only access the stage only once the applicationComplete event has been dispatched. So you have to wait to receive this event before adding the key listener the first time.
You'll find attached an example of this.
+