#NEWLINE# @ staticmethod #NEWLINE# def _get_symbol_and_modifiers( ev ) : #NEWLINE# #INDENT# wchar = c_wchar ( ) #NEWLINE# carbon . GetEventParameter ( ev , kEventParamKeyUnicodes , typeUnicodeText , c_void_p ( ) , sizeof ( wchar ) , c_void_p ( ) , byref ( wchar ) ) #NEWLINE# wchar = str ( wchar . value ) . upper ( ) #NEWLINE# if ( wchar in charmap . keys ( ) ) : #NEWLINE# #INDENT# symbol = charmap [ wchar ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# sym = c_uint32 ( ) #NEWLINE# carbon . GetEventParameter ( ev , kEventParamKeyCode , typeUInt32 , c_void_p ( ) , sizeof ( modifiers ) , c_void_p ( ) , byref ( sym ) ) #NEWLINE# symbol = keymap . get ( sym . value , None ) #NEWLINE# if ( symbol is None ) : #NEWLINE# #INDENT# symbol = key . user_key ( sym . value ) #NEWLINE# #UNINDENT# #UNINDENT# modifiers = c_uint32 ( ) #NEWLINE# carbon . GetEventParameter ( ev , kEventParamKeyModifiers , typeUInt32 , c_void_p ( ) , sizeof ( modifiers ) , c_void_p ( ) , byref ( modifiers ) ) #NEWLINE# return ( symbol , CarbonWindow . _map_modifiers ( modifiers . value ) )