keystroke handling (WIP)