code: def control(self, key):
          
          if not self.connection:
              raise exceptions.ConnectionClosed()
  
          payload = json.dumps({
              "method": "ms.remote.control",
              "params": {
                  "Cmd": "Click",
                  "DataOfCmd": key,
                  "Option": "false",
                  "TypeOfRemote": "SendRemoteKey"
              }
          })
  
          logging.info("Sending control command: %s", key)
          self.connection.send(payload)
          time.sleep(self._key_interval)
docs: Send a control command.