From 36f4b338e165e5ea3b5a52c7174cd534bfd372a1 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 23 Oct 2026 20:50:59 +0200 Subject: [PATCH] fix: offer no paging keys on muxterm muxterm keeps PgUp and PgDn for its scrollback and its L1 and R1 send nothing: the help named a page key that never reaches the interface. --- install.ps1 | 2 +- install.py | 7 +++++-- install.sh | 2 +- tests/test_install_tui.py | 7 +++++++ 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/install.ps1 b/install.ps1 index d9cc53e2..7bb0e43c 100644 --- a/install.ps1 +++ b/install.ps1 @@ -11,7 +11,7 @@ $ErrorActionPreference = "Stop" $defaultInstallUrl = "https://raw.githubusercontent.com/Abdess/retrobios/main/install.py" - $defaultInstallSha256 = "4d0a09cb5df35b5ccac1addbcd31feaf1ae00153694c11c7a1894e73bc063833" + $defaultInstallSha256 = "3d36f9aaf0bfd17cc2eeff61d0f99d35ff60d7cf967572ec146b166681334e5d" $maximumInstallerBytes = 2MB $installerExit = 0 $installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null } diff --git a/install.py b/install.py index a02b083f..c91ddc7a 100644 --- a/install.py +++ b/install.py @@ -12044,7 +12044,9 @@ _HELP_KEYS: dict[str, dict[str, str | None]] = { "tick": "X, Space, Right/Left", "options": "Y, Tab, o", "back": "B, Select, Esc", "stop": "B, Esc, Ctrl-C", "kill": None, "enter": "A, Enter", "esc": "B, Esc"}, - "muxterm": {"move": "D-pad, Up/Down", "page": "PgUp/PgDn", "ok": "Start, Enter", + # muxterm keeps PgUp and PgDn for its own scrollback, and its L1 and R1 + # send nothing: no key pages a list there. + "muxterm": {"move": "D-pad, Up/Down", "page": None, "ok": "Start, Enter", "tick": "Y, Space, Right/Left", "options": "o, Tab", "back": "B, Esc, Backspace", "stop": "B, Esc, Ctrl-C", "kill": None, "enter": "Start, Enter", "esc": "Esc"}, @@ -12080,7 +12082,8 @@ def _help_lines(state: TuiState) -> list[tuple[str, str]]: *_route_extras(state)] keys = [(names["move"], "Move")] if len(tui_rows(state)) > 9 or screen in _PAGERS: - keys += [(names["page"], "Page"), ("Home/End, g/G", "First, last")] + keys += [*([(names["page"], "Page")] if names["page"] else []), + ("Home/End, g/G", "First, last")] primary = _primary(state) or _TUI_VIEWS[screen](state, 80, 24)[2][0] ok = names["ok"] if state.pad == "miyoo" and screen in _CHECKLISTS: diff --git a/install.sh b/install.sh index bb28d346..0a7fce9a 100755 --- a/install.sh +++ b/install.sh @@ -18,7 +18,7 @@ esac TEMP_INSTALLER="" TEMP_DIRECTORY="" DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/install.py" -DEFAULT_INSTALL_SHA256="4d0a09cb5df35b5ccac1addbcd31feaf1ae00153694c11c7a1894e73bc063833" +DEFAULT_INSTALL_SHA256="3d36f9aaf0bfd17cc2eeff61d0f99d35ff60d7cf967572ec146b166681334e5d" MAX_INSTALLER_BYTES=2097152 cleanup() { diff --git a/tests/test_install_tui.py b/tests/test_install_tui.py index 64c06276..1f46b96d 100644 --- a/tests/test_install_tui.py +++ b/tests/test_install_tui.py @@ -1097,6 +1097,13 @@ class PadRoutes(unittest.TestCase): "Close the terminal"): self.assertIn(words, muxterm) self.assertNotIn("Start+Select", muxterm) + # 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"): + with self.subTest(screen=screen): + text = help_text("muxterm", screen) + for words in ("L1", "R1", "PgUp", "PgDn", "Page"): + self.assertNotIn(words, text) miyoo = help_text("miyoo", "systems") for words in ("Start, Enter", "A, Space, Right/Left", "R2, Esc, Backspace", "L2, Tab, o", "Sends no key here"):