#NEWLINE# def keytext_to_keyinfo_and_event( keytext ) : #NEWLINE# #INDENT# keyinfo = keysyms . common . make_KeyPress_from_keydescr ( keytext ) #NEWLINE# if ( ( len ( keytext ) == 3 ) and ( keytext [ 0 ] == '"' ) and ( keytext [ 2 ] == '"' ) ) : #NEWLINE# #INDENT# event = Event ( keytext [ 1 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# event = Event ( keyinfo . tuple ( ) [ 3 ] ) #NEWLINE# #UNINDENT# return ( keyinfo , event )