Colour the page nav keys on every page to follow the ALL button.

nav_templates.json holds Companion's own UP / page number / DOWN keys after
'convert to regular button'; make_page.py colours them from the ALL tile and
nav_keys.py copies them onto all 96 other pages (288 keys, recorded in
nav_locations.json; --revert restores the built-in keys). Also rewrites the
README's top half, which an earlier edit had duplicated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 09:40:45 -04:00
co-authored by Claude Opus 5.5
parent 161596cefb
commit 3118cdc281
7 changed files with 1593 additions and 62 deletions
+9 -3
View File
@@ -555,11 +555,17 @@ class TestPage(unittest.TestCase):
def test_layout(self):
self.assertEqual(self.export["type"], "page")
self.assertEqual(self.export["oldPageNumber"], 19)
self.assertEqual(self.controls["0"]["0"], {"type": "pageup"})
self.assertEqual(self.controls["2"]["0"], {"type": "pagedown"})
for (r, kind, action) in (("0", "pageup", "inc_page"), ("1", "pagenum", "set_page"), ("2", "pagedown", "dec_page")):
key = self.controls[r]["0"]
self.assertEqual(key["type"], "button-layered")
self.assertTrue(key["options"]["notes"].startswith("STATUS nav key (%s)" % kind))
self.assertEqual(key["steps"]["0"]["action_sets"]["down"][0]["definitionId"], action)
box = [l for l in key["style"]["layers"] if l["type"] == "box"][0]
self.assertTrue(box["color"]["isExpression"])
self.assertIn("'$.all.b'", box["color"]["value"]) # follows the ALL button
positioned = [t for t in CONFIG["tiles"] if "pos" in t]
n = sum(1 for r in self.controls.values() for c in r.values() if c["type"] == "button-layered")
self.assertEqual(n, len(positioned))
self.assertEqual(n, len(positioned) + 3) # + the three nav keys
# The master is where the smallest Stream Deck can see it.
self.assertEqual(CONFIG["tiles"][0]["pos"], [0, 1])