#NEWLINE# @ win . event #NEWLINE# def on_key_press( symbol , modifiers ) : #NEWLINE# #INDENT# if ( ( symbol == KEY_PAUSE ) and in_game ) : #NEWLINE# #INDENT# if ( not paused ) : #NEWLINE# #INDENT# pause_game ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# resume_game ( ) #NEWLINE# #UNINDENT# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( modifiers == key . ESCAPE ) : #NEWLINE# #INDENT# sys . exit ( ) #NEWLINE# #UNINDENT# #UNINDENT# return pyglet . event . EVENT_HANDLED