inputs.TransmitterReference

class inputs.TransmitterReference(hand: Optional[inputs.Hand], id: int = 0)

Represents a specific transmitter. The target transmitter may be on the left or right hand, or it may be a custom keyboard transmitter. To set the state of a button on this transmitter, call press(). To read for the state of a transmitter, call stream().

press(key: Union[inputs.ButtonId, str], value: float = 1)

Use this to virtually press a key on this transmitter. It will stay pressed until you call this again with value 0.

If this transmitter represents a hand transmitter, supply key as a ButtonId. If instead it represents a custom (i.e. keyboard) transmitter, use a str for key.

stream(key: Union[inputs.ButtonId, str]) streams.Stream[float]

Returns a stream of input values from this transmitter for the key key.