Improved speed

Quits immediately if no key press is detected.
Revert "Improved speed"

This reverts commit 381400a0683a02d101bdcb05042263b3daa22687.