Listening to keyBoard in Adobe AIR/FLEX….

By | March 29, 2012

Hi all….

We all need to know which key is pressed in an application up on which we may need to take an action. For example if the user presses “Ctrl + s” we know he want to save. So for that we need to listen to keyBoard events. For this we use the keyBoard event Listener. First we register our application with the KeyBoard eventListener. After that we will implement the callback function associated with the event. Here the callback function is named “keyListener”. See how it works.
Copy and paste to your MXML file and view the console for the output after pressing any key in the keyboard.


Please leave your valuable comments if this post was useful…..

Leave a Reply

Your email address will not be published. Required fields are marked *