implement KeyboardInput