aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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}")