Read the pad, detect unknown ones, layout editor

added a feature that now can read the inputs off the board, meaning if you already have saved settings and you uninstall / reinstall the app or use it on a new device it can auto detect what each key has saved.

using the above feature i now also do believe it is possible to auto detect the macros pads rough layout / how many keys and dials it has!. hopfully this means that more people can use the app easily without needing to hard code a bunch of new layouts. its not truly universal but it should open the door to much more pads working out of the box right now!

and lastly in case the extra layouts do work i made a little layout editor so you can the app to look like your actual macropad!
This commit is contained in:
Mohamed Mahjoub
2026-09-16 20:39:44 +01:00
committed by GitHub
parent 5b7bf9dadd
commit ed707b1ae7
26 changed files with 1740 additions and 174 deletions

View File

@@ -139,6 +139,13 @@ def scene_first_launch():
save(w, "first-launch")
def scene_read():
w = window(bindings=DEMO)
w._say("Read 18 controls from the pad.", A.GOOD)
select(w, "dial1-left")
save(w, "read-pad")
def scene_select_and_type():
w = window(bindings={k: v for k, v in DEMO.items() if k.startswith("dial")})
select(w, "key2")
@@ -191,6 +198,19 @@ def scene_written():
save(w, "step-written")
def scene_edit_layout():
w = window(bindings=DEMO)
w._edit_layout(True)
spots = {k: (r, c) for k, r, c
in __import__("macropad_gui.padview", fromlist=["padview"])
._key_grid(w.pad.layout, w.pad.orientation)}
w.pad.drag = "key2"
w.pad.drag_at = w.pad.keys["key11"].center()
w.pad.drop = spots["key11"]
save(w, "edit-layout")
w._edit_layout(False, keep=False)
def scene_flat():
w = window(bindings=DEMO)
w.pad.set_orientation("flat")