I tend not to rely on the Flush commands, because for some reason they don't appear to completely clear the buffer. Don't know why, but I've found myself using the Repeat...Until Not KeyDown() route quite a few times - even after using FlushKeys/Mouse.