Changing the image displayed according to key presses