Bright Hub
 
Matthew Casperson's Hubfolio

keyCode in Flash/Flex

RSS

Responding to keyboard events in Flex and Flash requires setting up an event handler for the KeyboardEvent.KEY_DOWN and KeyboardEvent.KEY_UP events, and then using the KeyboardEvent.keyCode to work out which key was pressed.

If you are like me every time you need to find a keyCode you have to add a breakpoint in your code and use the debugger to find it out. To make things easier this utility here allows you to easily find out which keyCode relates to which key.

The source code is attached to this post.


Written by Matthew Casperson (4,880 pts ) in Matthew Casperson Blog
Last Edited on Sep 14 2009, 11:56 AM

Tags: , ,
Attachment: KeyCodeUtil.zip
 

Bright Hub - Science & Technology Articles, Buyer's Guides, How-To Tips and Software Reviews
About Bright Hub | Contact Us | Advertise with Us | Become a Writer | RSS | Site Map | Terms of Use | Privacy Policy | Copyright Policy
©2009 Bright Hub Inc. All rights reserved. Page copy protected against web site content infringement by Copyscape