Support for ugly imperative keypress waiting loops