If an unmapped key is pressed repeatedly, we store the key sequence in
a 32 byte buffer until there is no more space left in the buffer. Then
we terminate the process with
This is not a nice way to deal with invalid input, so be a bit more
graceful and discard the buffer when it is full or when there is no
further input available at the moment.