aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-10-05 23:38:48 +1300
committerArslaan Pathan <[email protected]>2026-10-05 23:38:48 +1300
commit0b8dd7f240dafc5fe51e604cb73fa4f52a674672 (patch)
tree5bdeab44551524f8292ee9a72ef107e1871cc0d2
parent5734ff601eadae2d2d995244696191fc044b55f6 (diff)
downloadremote-automation-0b8dd7f240dafc5fe51e604cb73fa4f52a674672.tar.xz
remote-automation-0b8dd7f240dafc5fe51e604cb73fa4f52a674672.zip
more scancodes
-rw-r--r--main.py3
1 files changed, 2 insertions, 1 deletions
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}")