From 0b8dd7f240dafc5fe51e604cb73fa4f52a674672 Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Mon, 5 Oct 2026 23:38:48 +1300 Subject: more scancodes --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main.py') diff --git a/main.py b/main.py index b0de076..55c12b9 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,6 @@ from evdev import InputDevice, list_devices, ecodes -SCANCODES = {0x11A: "up", 0x148: "down", 0x147: "left", 0x107: "right", 0x106: "ok"} +SCANCODES = {0x11A: "up", 0x148: "down", 0x147: "left", 0x107: "right", 0x106: "ok", 0x141: "play/pause", 0x11c: "power", 0x103: "vol+", 0x142: "vol-"} device = None last = 0x00 @@ -29,6 +29,7 @@ try: last = event.value action = SCANCODES.get(event.value) if action: + print(f"got action {action}") do_action(action) else: print(f"repeat scancode {event.value:#x}") -- cgit v1.2.3