From: Albert Wagner Date: 2001-08-07T10:06:14+09:00 Subject: [ruby-talk:19266] Re: Ruby/Tk: how to discard excess messages Thanks, Nat. That's useful to know. I didn't realise that no releases were being sent. However, I still have a problem: I am using the up/down arrow keys to scroll. I want to be able to hold the key down; I just don't want presses any faster than I can redraw the window. On Monday 06 August 2001 16:41, you wrote: > From: "Albert L. Wagner" > > > An auto-repeat key is sending additional messages while method is > > still processing first message. How can I discard the excess > > messages? > > Once you have received a KeyPressed event for a particular key, ignore > further KeyPressed events for the same key until you receive a KeyReleased > event for that key. An auto-repeating key sends multiple KeyPressed events > without any KeyReleased events until the user actually releases the key.