inputs.ButtonId

class inputs.ButtonId(value)

Each Button Id corresponds to a button on the transmitter.

The order here is the same as they appear in the transmitter menu in game.

In the following example the ButtonId.UP value is used to get a stream of signals from the left transmitter’s UP button.

from inputs import Transmitters, ButtonId
from controllables import TextScreen

# get the output screen
screen = TextScreen()
screen.horizontal_alignment = TextScreen.HorizontalAlignment.LEFT

# we pass the id, UP, to the stream method to get the UP signal stream
signals = Transmitters.left_transmitter().stream(ButtonId.UP)

# in an infinite loop
while True:
    # we'll get get the last signal in the stream
    for signal in signals:
        # and display it on the screen
        screen.text = f'Left UP: {signal: 0.2f}'
UP
DOWN
LEFT
RIGHT
MAIN
SECONDARY
FORWARD

Alias for UP

BACK

Alias for DOWN

TRIGGER

Old name for MAIN based on the VR controller button name

PRIMARY

Old name for SECONDARY based on the VR controller button name