The first step would be to listen to FlexEvent.ENTER and KeyboardEvent KEY_UP or KEY_DOWN events to catch the user keyboards inputs.
As for what to do next, the FocusManager class and the components setFocus() methods should allow you to implement what you need.
Thanks for your reply. Can you give me any reference where I can get some code snippet which help me to understand how to implement this logic?
Sorry I don't have much time to search for good examples.
Still found this for keyboard events handling:
And this for focus management:
You can probably find other good examples by googling flex events handling, flex keyboard events or flex focus management.
I have the below requirement and not able to figure out how should I proceed.
1. Enable enter key in my flex application. When the user is on one control and presses enter key, the navigation should move to the next conrtol
2. Allow user to press CTRL+ <letter> for quick navigation to controls (like we have in VB).
Any suggestions/help would be very helpful.
Enabling the enter key, you might want to look into the 'defaultButton' attribute for different containers. For example, if you're filling in a textbox and you want an action to occur when you hit enter rather than having to click a button with the mouse.
CTRL + letter keyboard shortcuts, i have a small example of this kind of stuff on my site:
i imagine you could also extend my example into a more elaborate solution, which could capture the enter key press and perform an action depending on what is currently displayed on your screen. Although that'll require you to constantly add and remove the listener.
private function initApp():void
private function keyPressed(evt:KeyboardEvent):void
if(evt.keyCode == Keyboard.ENTER)
//do your tricks
<mx:TextInput color="#000000" fontWeight="normal" id="txtContains" width="195" themeColor="#A50707"/>