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