`read_key()` crashes the program on invalid bytes. If too much data is returned, for example when pasting text, it skips the additional bytes.