add space keypress to take snapshot