code: def lookup_character_keycode(self, character):
          
          keysym = self.string_to_keysym.get(character, 0)
          if keysym == 0:
              keysym = self.string_to_keysym.get(KEYSYMS[character], 0)
          return self.display.keysym_to_keycode(keysym)
docs: Looks up the keysym for the character then returns the keycode mapping
          for that keysym.