diff options
| author | Arslaan Pathan <[email protected]> | 2026-10-05 23:13:32 +1300 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-10-05 23:13:32 +1300 |
| commit | 91e944bc70736ec10816f401ab4a2172624f2aff (patch) | |
| tree | 0fba55e659d948542b15c3acb428a9f6950b5e37 /main.py | |
| parent | 5c34017ff907744e8738de3951433224e6ce2a52 (diff) | |
| download | remote-automation-91e944bc70736ec10816f401ab4a2172624f2aff.tar.xz remote-automation-91e944bc70736ec10816f401ab4a2172624f2aff.zip | |
basic test
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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}") |
