From 91e944bc70736ec10816f401ab4a2172624f2aff Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Mon, 5 Oct 2026 23:13:32 +1300 Subject: basic test --- main.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 main.py (limited to 'main.py') 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}") -- cgit v1.2.3