On 1/23/07, Mark Greenberg <[EMAIL PROTECTED]> wrote:
I have an application where the user types in numbers, but I don't want the keys to automatically repeat. For instance, if the user holds down the 5 key too long, I don't want 5555 to appear. I am already capturing the keystroke with an ON KeyDown handler and manipulating the user's input. Using KeyUp instead causes a problem when two keys are pressed, so that won't work.
How about something like this (untested): local sKeyPressed on keyDown pKey if sKeyPressed <> true then put true into sKeyPressed pass keyDown end if end keyDown on keyUp put false into sKeyPressed end keyUp When a key is pressed, it checks the flag. If it is not true, then the keyDown message gets passed so the key will be typed. Then the flag is set to true. Any more keyDowns will be ignored until the flag is reset which happens on keyUp. Cheers, Sarah _______________________________________________ use-revolution mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
