Added onKeyDown and onClick handlers