#NEWLINE# def on_state_changed( self , state ) : #NEWLINE# #INDENT# if state : #NEWLINE# #INDENT# self . editor . post_key_pressed . connect ( self . _on_post_key_pressed ) #NEWLINE# self . editor . key_pressed . connect ( state . _on_key_pressed ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . editor . post_key_pressed . disconnect ( self . _on_post_key_pressed ) #NEWLINE# self . editor . key_pressed . disconnect ( self . _on_key_pressed )