On 12/1/2017 1:00 PM, Paul Dupuis via use-livecode wrote: > On 12/1/2017 12:52 PM, Kaveh Bazargan via use-livecode wrote: >> I have a field with a number in it. when focused, I want the value to go up >> and down with the up/down arrow keys. The trouble is that if I keep the key >> down, it traps multiple keydown messages that continue after the key is >> released. >> >> How can I ensure that message are terminated as soon as arrow key is >> released? >> > look at the dictionary entries for 'the pendingMessages' and the > 'cancel' command > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > what you actually want is flushEvents(eventType) -- see dictionary
just execute flushEvents("autoKey") when you handler is done to clear extraneous arrowkey messages _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode