ark::input::InputDevice

Defined in header “ark/input/input_device.hh”.


Represents a connection to an ‘input’ device (such as a gamepad). This is typically used to connect to a device to read input events, so that you can control a robot through gamepads.

Methods

  • InputDevice(const std::filesystem::path & device_path)
    Constructor. Connects to the given device.

  • ~InputDevice()
    Destructor.

  • std::vector< Event > read()
    Reads any pending events. Will return zero if no events are pending.