Added keyboard functionality (pause/resume/quit)