Fixed keyboard sensor
Modified input handler code style