chore: merge main into the round 4 fixes

This commit is contained in:
Abdessamad Derraz committed 2026-10-23 22:25:16 +02:00
commit 451ca88d7c
8 files changed
+1215 -9

No files matched your search

File diff suppressed because it is too large. Load diff
+2 -2
View File
@@ -1151,7 +1151,7 @@ class ThePortMasterPort(unittest.TestCase):
[hint] = device.lines("termapp.sdl")
assert_muxterm_hides_every_pad(self, hint)
assert_muxterm_mapping(self, device.mapper_args(), self.gamedir / "retrobios.gptk")
self.assertEqual(call["pad"], "gptokeyb")
self.assertEqual(call["pad"], "gptokeyb_muxterm")
self.assertEqual(call["idle_exit"], "300")
self.assertEqual(self.dialog(device), ["FINISH"])
@@ -1483,7 +1483,7 @@ class TheMuosApp(unittest.TestCase):
self.assertRegex(args[1], r"^retrobios-stop-\d+x$")
assert_muxterm_mapping(self, args, app / "retrobios.gptk")
self.assertEqual(read_gptk(Path(args[-1]))["y"], ["tab"])
self.assertEqual(call["pad"], "gptokeyb")
self.assertEqual(call["pad"], "gptokeyb_muxterm")
self.assertEqual(call["idle_exit"], "300")
device.assert_mapper_stopped()
+9 -1
View File
@@ -60,7 +60,7 @@ except ImportError:
GOLDEN = REPO_ROOT / "tests" / "fixtures" / "tui"
SIZES = ((40, 12), (40, 15), (80, 24), (120, 40))
# RETROBIOS_PAD's values, and "keys" for a desktop that sets none.
ROUTES = ("keys", "gptokeyb", "evmapy", "muxterm", "miyoo")
ROUTES = ("keys", "gptokeyb", "gptokeyb_muxterm", "evmapy", "muxterm", "miyoo")
UP, DOWN, RIGHT, LEFT = "\x1b[A", "\x1b[B", "\x1b[C", "\x1b[D"
Key = install.TuiKey
@@ -994,6 +994,7 @@ def _bar_keys(line: str) -> set:
ROUTE_KEYS = {
"keys": {"Enter", "Esc", "Space", "o", "?", "/", "Ctrl-C", "Ctrl-U"},
"gptokeyb": {"A", "B", "X", "Y", "Start+Select"},
"gptokeyb_muxterm": {"A", "B", "X", "Y", "Start+Select"},
"evmapy": {"A", "B", "X", "Y"},
"muxterm": {"Start", "B", "Y", "Menu", "Select"},
"miyoo": {"A", "Start", "R2", "L2"},
@@ -1098,6 +1099,13 @@ class PadRoutes(unittest.TestCase):
"Close the terminal"):
self.assertIn(words, muxterm)
self.assertNotIn("Start+Select", muxterm)
# gptokeyb2 owns the pad inside muxterm, which keeps PgUp and PgDn
# for its scrollback: the gptokeyb buttons, and no page key.
in_muxterm = help_text("gptokeyb_muxterm", "preview")
for words in ("A, Start, Enter", "Select, then Start"):
self.assertIn(words, in_muxterm)
self.assertNotIn("L1/R1", in_muxterm)
self.assertIn("L1/R1", help_text("gptokeyb", "preview"))
# muxterm keeps PgUp and PgDn for its scrollback, and L1 and R1
# send nothing: no paging is offered there, on a list or a pager.
for screen in ("systems", "result", "plan"):