added left and right key press event
handle left and right keys