Have a flag set on KeyDown and unset on KeyUp.  If KeyDown gets called and
the flag is true you have the case you're looking for.  It will be a little
more complicated than this because of things like the control/shift keys,
and i'm not sure what happens if the user hits two keys simultaneously.  To
deal with these issues you could also save what key was pressed last.  If
it's the same key as the current key down, then it means the person is still
pressing that key.

Daniel Freiman
nondocs <http://nondocs.blogspot.com>

On 5/9/07, Matt <[EMAIL PROTECTED]> wrote:

  I am currently listening for KeyboardEvent.KEY_DOWN and this works
fine for what I'm trying to do so long as someone doesn't hold down
the key. Is there any way to capture typematic repeats on a key?
This is for a TextInput component. I'm extending TextInput to create
a custom component with functionality for up and down arrows. These
won't throw a CHANGE event so I can't do any fancy footwork there.

Any ideas?

Reply via email to