Check if the user pressed the space bar.