HID input devices including gamepad controllers, joysticks, and keyboard.
More...
|
| typedef std::vector< std::pair< std::string, std::string > > | DeviceList |
| | Typedef of device <path, name> pairs. More...
|
| |
HID input devices including gamepad controllers, joysticks, and keyboard.
◆ InputDevices
◆ ~InputDevices()
| InputDevices::~InputDevices |
( |
| ) |
|
◆ InputDevices()
| InputDevices::InputDevices |
( |
| ) |
|
|
protected |
◆ Create()
◆ Enumerate()
| static void InputDevices::Enumerate |
( |
DeviceList & |
devices | ) |
|
|
static |
Scan /dev/input for devices.
◆ FindPathByName()
| static std::string InputDevices::FindPathByName |
( |
const char * |
name | ) |
|
|
static |
Find /dev/input path by device name.
◆ GetJoystick()
Retrieve the gamepad device.
◆ GetKeyboard()
Retrieve the keyboard device.
◆ Poll()
| bool InputDevices::Poll |
( |
uint32_t |
timeout = 0 | ) |
|
Poll the devices for updates.
◆ mJoystick
◆ mKeyboard
◆ JoystickDevice
◆ ~JoystickDevice()
| JoystickDevice::~JoystickDevice |
( |
| ) |
|
◆ JoystickDevice()
| JoystickDevice::JoystickDevice |
( |
| ) |
|
|
protected |
◆ Create()
| static JoystickDevice* JoystickDevice::Create |
( |
const char * |
device = "Microntek USB Joystick " | ) |
|
|
static |
◆ Poll()
| bool JoystickDevice::Poll |
( |
uint32_t |
timeout = 0 | ) |
|
Poll the device for updates.
◆ MAX_AXIS
| const int JoystickDevice::MAX_AXIS = 256 |
|
staticprotected |
◆ mAxisNorm
| float JoystickDevice::mAxisNorm[MAX_AXIS] |
|
protected |
◆ mAxisRaw
◆ mFD
◆ mPath
| std::string JoystickDevice::mPath |
|
protected |
◆ KeyboardDevice
◆ ~KeyboardDevice()
| KeyboardDevice::~KeyboardDevice |
( |
| ) |
|
◆ KeyboardDevice()
| KeyboardDevice::KeyboardDevice |
( |
| ) |
|
|
protected |
◆ Create()
| static KeyboardDevice* KeyboardDevice::Create |
( |
const char * |
path = "/dev/input/by-path/platform-i8042-serio-0-event-kbd" | ) |
|
|
static |
◆ KeyDown()
| bool KeyboardDevice::KeyDown |
( |
uint32_t |
code | ) |
const |
Check if a particular key is pressed.
◆ Poll()
| bool KeyboardDevice::Poll |
( |
uint32_t |
timeout = 0 | ) |
|
Poll the device for updates.
◆ MAX_KEYS
| const int KeyboardDevice::MAX_KEYS = 256 |
|
staticprotected |
◆ mFD
◆ mKeyMap
◆ mPath
| std::string KeyboardDevice::mPath |
|
protected |
◆ DeviceList
| typedef std::vector< std::pair<std::string, std::string> > DeviceList |
Typedef of device <path, name> pairs.