working through bugs with new way of handling keystrokes