Working on terminal and key events

Debugging illegal hardware instructions was fun.