Added support for keystrokes
Again lots of minor fixes / changes