code: def create_event_object(self,
                              event_type,
                              code,
                              value,
                              timeval=None):
          
          if not timeval:
              timeval = self.__get_timeval()
          try:
              event_code = self.manager.codes['type_codes'][event_type]
          except KeyError:
              raise UnknownEventType(
                  "We don't know what kind of event a %s is." % event_type)
          event = struct.pack(EVENT_FORMAT,
                              timeval[0],
                              timeval[1],
                              event_code,
                              code,
                              value)
          return event
docs: Create an evdev style object.