pause if space bar is pressed