Added left and right arrow key functionality