I'm not quite sure what you mean with an extended key, but if it is what i think you mean it is then this might help.
You mean wether is being pressed for a while rather than just once? I don't think you can do this with the keydown event, because it only fires when the controll receives a keystroke. That's not enough to determine if the key was pressed between two keystrokes. What you can do is put a script in a timer wich fires every 10 or maybe 100 miliseconds. You can check with the keyboard.asynckeydown() wheter a key is being pressed. So you could loop trough all keys and check wheter that key is being pressed or not. Then you create a dictonary with a value for each key, wich is just an integer that stacks on every "keypress". Then if it's been a certain amount of presses, you know its an extended key. And when the value of a key is higher than -1 but the key is not being pressed you set the value to -1, so you know it's not supposed to stack unless the key is pressed. To check how much time there is before a keypress becomes extended, test it with an editfield. Put in the editfields keydown event some code that captures the time and compore it from the first and second. On 2/13/06, Brian Rathbone <[EMAIL PROTECTED]> wrote: > > Greetings list, > > I have a canvas subclass, and in the keydown event I need to determine > if the key is an extended key. The purpose is to determine if I need to > use the KEYEVENTF_EXTENDEDKEY flag to simulate the same keystroke. > > Thanks in advance for any help you can offer. > > Brian > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives of this list here: > <http://support.realsoftware.com/listarchives/lists.html> > _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
