Added KeyHandler and KeyHandlerTest.