echo whitespace and keycode case
removed extra write functions
Hack for FF (#6)