diff options
| author | Arslaan Pathan <[email protected]> | 2026-10-06 13:58:53 +1300 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-10-06 13:58:53 +1300 |
| commit | 1882e321cf58a569ce7cdbb0cdb615a6a38fb6b9 (patch) | |
| tree | 63e71b50a193f088bdae54b76f5712062e0d722c /main.py | |
| parent | 9935b1c6a0e0845f724a9c495caf01977ee81fbb (diff) | |
| download | remote-automation-1882e321cf58a569ce7cdbb0cdb615a6a38fb6b9.tar.xz remote-automation-1882e321cf58a569ce7cdbb0cdb615a6a38fb6b9.zip | |
cgit button
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2,7 +2,7 @@ from evdev import InputDevice, list_devices, ecodes from urllib.request import urlopen from urllib.error import HTTPError, URLError -SCANCODES = {0x11A: "up", 0x148: "down", 0x147: "left", 0x107: "right", 0x106: "ok", 0x141: "play/pause", 0x11c: "power", 0x103: "vol+", 0x142: "vol-", 0x101: "app", 0x154: "1", 0x110: "stop", 0x14b: "skip", 0x155: "epg", 0x119: "web"} +SCANCODES = {0x11A: "up", 0x148: "down", 0x147: "left", 0x107: "right", 0x106: "ok", 0x141: "play/pause", 0x11c: "power", 0x103: "vol+", 0x142: "vol-", 0x101: "app", 0x154: "1", 0x110: "stop", 0x14b: "skip", 0x155: "epg", 0x119: "web", 0x15f: "setting"} device = None last = 0x00 @@ -41,6 +41,8 @@ def do_action(action: str): homelab_request("voldown") elif action == "web": homelab_request("zola") + elif action = "setting": + homelab_request("cgit") for path in list_devices(): candidate = InputDevice(path) |
