Fixes to the key event handler

Takes all ascii chars that are printable now.