aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-10-05 23:13:32 +1300
committerArslaan Pathan <[email protected]>2026-10-05 23:13:32 +1300
commit91e944bc70736ec10816f401ab4a2172624f2aff (patch)
tree0fba55e659d948542b15c3acb428a9f6950b5e37
parent5c34017ff907744e8738de3951433224e6ce2a52 (diff)
downloadremote-automation-91e944bc70736ec10816f401ab4a2172624f2aff.tar.xz
remote-automation-91e944bc70736ec10816f401ab4a2172624f2aff.zip
basic test
-rw-r--r--main.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/main.py b/main.py
new file mode 100644
index 0000000..e085ec9
--- /dev/null
+++ b/main.py
@@ -0,0 +1,9 @@
+from evdev import InputDevice, ecodes
+
+device = InputDevice("/dev/input/event0")
+
+print(f"Listening on {device.path}: {device.name}")
+
+for event in device.read_loop():
+ if event.type == ecodes.EV_MSC and event.code == ecodes.MSC_SCAN:
+ print(f"Scancode: {event.value:#x}")