EC-018: TV remote D-pad focus in the launcher and menus — run sheet
Paired WP: WP-118 Purpose: Run WP-118 in a fixed order, recording each step’s outcome as it’s done. Status: done (2026-11-30). Steps 1–4, 6 and 7 done; step 5 partly, as WP-118 was closed with criteria 3, 5 and 6 partly checked. Step 6 done: D5 applied and Jeff’s 3 m check passed, both on 2026-11-30.
Pre-flight
- WP-118 is 📝 Drafted on
main(D1–D6 answered 2026-11-29), and nobody else holds it: no open PR, branch or worktree names it. - Write
docs/reference/pre-flight-WP-118-<date>.md:- the fork pin, and whether upstream
fa8126a019is still needed; - the files to change in
gui/andbackends/platform/android/; - D2’s switch (how a TV build turns focus on);
- the risks: widgets that eat arrow keys, scroll containers, pop-ups, the touch keyboard, WP-113’s game keymap.
- the fork pin, and whether upstream
- Create a fork worktree with
tools/New-ForkWorktree.ps1. Never switch branches inC:\dev\scummvm. - Record the TV’s current versionCode; the new build goes above it.
Step 1 — Grid focus from upstream (time-box: 0:30)
- Cherry-pick
fa8126a019(“GUI: Make GridWidget accept focus”), or note that the fork already has it.
Outcome: Needed: it isn’t an ancestor of scooby-engine @ dc8a9b3a57.
Cherry-picked with -x (516b27b7d3).
Step 2 — Traversal and activation (time-box: 6:00)
- Which widgets can take the focus (WP-118 scope 1), without changing what a mouse click focuses.
- The direction rule, as D3 decides, over the dialog’s visible focusable widgets, including those inside containers and tabs.
- Widgets that use an arrow themselves keep it, and hand it on at their edge (list, grid, slider, tabs, pop-up).
- OK activates the focused widget; an edit field opens the keyboard only on OK.
- The initial focus for every dialog (scope 3); in the launcher, the list’s or grid’s selection, never the search field.
Outcome: Done in GUI::Dialog and the widgets. The parts:
wantsNavigationFocus();- the D3 rule on rectangles;
- the hand-on at edges;
- Return to activate;
- the edit field’s keyboard waiting for OK;
- the initial focus with
gui_dpad_focus.
Two rule changes came from the TV: the minor axis is the gap between the rectangles, and the search starts in the innermost group. Both are in WP-118 §Result. The grid’s arrows are a commit of their own.
Step 3 — The focus state (time-box: 2:00)
- The focused widget draws as D4 decides, in the stock themes and the TV theme.
- Scroll containers scroll the focus into view.
Outcome: Buttons and sliders use the theme’s highlight state. Pop-ups, checkboxes, radio buttons and the tab row draw a highlighted button. Edit fields and the grid’s selected entry use the focused list’s green bar. These looks are drawn in the foreground layer only, after a stale box showed on the TV. Checked in the TV theme and, on Windows, in the stock theme.
Step 4 — Android bindings (time-box: 1:00)
- The GUI keymap’s Up, Down, Left and Right on the D-pad (and
JOY_HAT_*) where D2 says; the left stick keeps the Virtual Mouse. - The bindings show in Global Options → Keymaps and can be remapped.
Outcome: With gui_dpad_focus set, the GUI’s Up…Right take JOY_UP…
and JOY_HAT_*. Select takes JOY_CENTER, SELECT and JOY_A, and
Interact is unbound. Keymaps shows them as remappable buttons (capture
61-km-gui-dirs). The Virtual Mouse keeps the D-pad for games.
Step 5 — Windows check (time-box: 1:30)
- GCC build, no new warnings in
gui/. - Keyboard arrows move the focus in every WP-118 scope-7 dialog; the mouse is unchanged; text-to-speech names the focused widget.
Outcome: Partly. MSYS2 UCRT64 GCC built with no warnings in gui/.
In the launcher, Right from the list focused Quit and Up ×3 reached Global
Options, in the stock theme’s hover red. Driving the window with SendKeys
was stopped once an Alt key from the focus workaround paired with Enter and
toggled fullscreen. Not checked: the other dialogs, the mouse,
text-to-speech.
Step 6 — TV check (time-box: 3:00)
- clang build with FreeType and the private identity, no new warnings
in
gui/orbackends/platform/android/;adb install -ronly. - Scope 7 on the TCL with screencaps, one per dialog: the focus is shown on open, every control is reachable, OK activates, BACK closes. WP-118 criteria 1–3.
- In Showdown, the D-pad still moves the game’s cursor at Sign In. Criterion 5.
- Jeff at 3 m with the remote, quoted. Criterion 4: “Everything worked” (2026-11-30, build 26041040).
- D5: if (a), the TV default goes back to the grid. Jeff chose (a) on 2026-11-30 (“Make grid default”), ahead of his check in the grid.
Outcome: Builds 26041021–26041036, then 26041037–26041039 with WP-123;
26041039 has the grid default, and 26041040, installed, adds OK opening the grid’s tray. The scope-7 screens were checked
with adb’s D-pad (WP-118 §Result), except Help. Showdown’s cursor moves with
D-pad long presses. The app opens on the grid (171-d5-grid-start).
Jeff’s 3 m check passed: “Everything worked.”
Step 7 — Close (time-box: 1:00)
- Fork PR into
scooby-engine, ScummVM-style commits, brand-free (grep every staged diff for the app’s name and id). - WP-118 §Result, this EC, the WORK_INDEX row, WP-104 criterion 10,
and D7’s note in
docs/ai/DECISIONS.mdif D5 is (a).
Outcome: Fork PR barefootbetters/scummvm#46
(seven commits, brand-free; the seventh, OK opening the grid’s tray, came after D5) and private PR
barefootbetters/scooby-engine-private#64
(gui_dpad_focus=true). WP-118 §Result, this EC, the WORK_INDEX row and
WP-104 criterion 10 are updated. D5 added gui_launcher_chooser=grid to
#64, and D7’s note and WP-104’s D7 row record the grid’s return.
Definition of done
- Every step’s outcome recorded, WP-118’s exit criteria met, its status updated.
Out-of-scope captures
-