support backspace

Code returned in non-GUI seens to be different from GUI mode (127 vs. 8).
Thus, both values are checked to preserve correctness.
print not-found message when wrong input
add strncmp
support event

Note: All events will be replaced with their plaintext in history.
use enum to manage the count of commands