keyboard events half sorted out