Fix KeyEvent and add documentation.