Fixes #51 plus unit test handlekeystrokes