added code to show the next picture on the press of the space key.