NA page-number key: hold 2 s = status page, keep holding to 3 s = LOCATIONS page
- nav_hold_more: longer holds go further (tested on NA's Companion emulator: 2.5 s -> 19, 3.5 s -> 98, tap -> 1) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2274,10 +2274,11 @@ class TestPage(unittest.TestCase):
|
||||
self.assertTrue(key["options"]["notes"].startswith("STATUS nav key (%s)" % kind))
|
||||
step = key["steps"]["0"]
|
||||
self.assertEqual(step["action_sets"]["down"], [])
|
||||
tap, hold = step["action_sets"]["up"][0], step["action_sets"]["1000"][0]
|
||||
tap, hold = step["action_sets"]["up"][0], step["action_sets"]["2000"][0] # NA: 2 s ...
|
||||
self.assertEqual((tap["definitionId"], tap["options"]["page"]["value"]), (action, 1)) # page 1 outright, not "startup"
|
||||
self.assertEqual((hold["definitionId"], hold["options"]["page"]["value"]), ("set_page", 19))
|
||||
self.assertEqual(step["options"]["runWhileHeld"], [1000])
|
||||
self.assertEqual(step["action_sets"]["3000"][0]["options"]["page"]["value"], 98) # ... then 3 s: LOCATIONS
|
||||
self.assertEqual(step["options"]["runWhileHeld"], [2000, 3000])
|
||||
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
|
||||
@@ -2297,7 +2298,7 @@ class TestPage(unittest.TestCase):
|
||||
for r in c.values():
|
||||
for ctl in r.values():
|
||||
sets = ctl.get("steps", {}).get("0", {}).get("action_sets", {})
|
||||
if "2000" in sets:
|
||||
if "2000" in sets and sets["2000"][0]["definitionId"] != "set_page": # not the page-number key's hold
|
||||
holds[sets["2000"][0]["options"]["value"]["value"]] = sets["up"]
|
||||
self.assertEqual(len(holds), len(CONFIG["restart_page"]["keys"]))
|
||||
self.assertIn("$(custom:sp_cmd);force rs_tascam $(internal:time_unix)", holds)
|
||||
|
||||
Reference in New Issue
Block a user