code: def emulate_repeat(self, value, timeval):
          
          repeat_event = self.create_event_object(
              "Repeat",
              2,
              value,
              timeval)
          return repeat_event
docs: The repeat press of a key/mouse button, e.g. double click.