#NEWLINE# @ classmethod #NEWLINE# def key_hold( cls , symbol , modifiers = 0 ) : #NEWLINE# #INDENT# 'Decorator to bind a method to be executed where a key is held down' #NEWLINE# def bind( f ) : #NEWLINE# #INDENT# if ( not hasattr ( f , '_grease_hold_key_binding' ) ) : #NEWLINE# #INDENT# f . _grease_hold_key_binding = [ ] #NEWLINE# #UNINDENT# f . _grease_hold_key_binding . append ( ( symbol , ( modifiers & cls . MODIFIER_MASK ) ) ) #NEWLINE# return f #NEWLINE# #UNINDENT# return modifiers