avoid CPU hogging in a hand-rolled Inkey() loop