Equivalent for 'xinput --set-prop' in libevdev?
I'm working on a tool which monitors evdev events on a Linux tablet and replays them on a host machine on a virtual evdev device created with libevdev.
I'm currently subprocessing to xinput to configure the virtual device (coordinate scaling, orientation etc.).
Can I replace these xinput commands with libevdev calls?
current code example:
device = libevdev.Device()
# Set device properties to emulate those of Wacom tablets
device.name = 'reMarkable pen'
device.id = {
'bustype': 0x03, # usb
'vendor': 0x056a, # wacom
'product': 0,
'version': 54
}
...
result = subprocess.run(
'xinput --set-prop "reMarkable pen stylus" "Wacom Rotation" 0',
capture_output=True,
shell=True
)
if result.returncode != 0:
print("Error setting orientation: %s", result.stderr.decode('utf8'))
Edited by Evan Widloski