feat(controller): a controller moves through the launcher, and Steam's Gaming Mode gets a full-screen TV view #209

Merged
HumanBean merged 1 commit from HumanBean/LongshotLauncher:feat/controller-tv into main 2026-11-19 18:09:43 +00:00
Owner

On a ROG Ally or Steam Deck in Steam's Gaming Mode the launcher can only be used with a mouse or the touchscreen, and on a TV its small window sits in the middle with black corners (MagicBeanDev/Longshot#1186). This lets a controller drive the whole launcher, gives Gaming Mode and Big Picture a full-screen TV view, and gives the window its platform's corners.

Controller

  • D-pad or left stick moves to the next control in that direction (repeats when held). A presses it, and opens or picks from a dropdown. B closes an open dropdown, else presses the page's or dialog's Back / Cancel / Keep / Decline / Done (c:Pad.Back="True", on every page and dialog but the home). LB/RB step through the focus order. Right stick scrolls.
  • Each press is sent as the key a gamepad would send (KeyDeviceType.Gamepad), so Avalonia 12's own directional focus (XYFocus) and the controls do the rest.
  • The first press focuses Play / Build / the page's main button, or a dialog's safe button. While a dialog is open, focus stays in it. The Settings cog is now focusable (up from the top of the home).
  • Windows reads Xbox-type controllers through XInput. Linux reads gamepads under /dev/input, skipping the ones Steam hides (SDL_GAMECONTROLLER_IGNORE_DEVICES). Two copies of one press (Steam's virtual pad and the real one) count once.
  • If something already turns the pad into keys (Steam's desktop layout), the doubled presses are noticed and the launcher stops reading the pad itself.

TV view

Turned on by SteamGamepadUI / SteamTenfoot (Gaming Mode, Big Picture) or a gamescope session. The window goes full screen and scales the pages up to the screen, with square corners and no Minimize. F11 toggles full screen anywhere. LONGSHOT_LAUNCHER_TV=1 forces it on, =0 off.

Corners

The fixed 18 px corners become the platform's: 8 px on Windows 11, square on Windows 10, 12 px on GNOME, 8 px on other Linux desktops, square in gamescope. They are square with no border when the window is full screen or maximized, or when the desktop can't draw a see-through window (that was where the black corners came from).

Screenshots

The TV view of the home after a controller's first press:

TV home

tools/screenshots has new scenes: tv-home, tv-settings (focus moved onto the channel cards without changing the selection) and tv-dialog (opens on Decline, and focus stays in the dialog).

Tests

  • tests/launcher_core/PadChecks.cs covers the repeat timing, dead zones, merging two copies of one controller, Steam's hidden-device list, evdev and XInput decoding, TV detection, the corner sizes, and that every page and dialog has a c:Pad.Back button.
  • test_release.py passes. The app builds with no warnings.
  • test_launcher_core.py: 2246 checks pass. BuildReportChecks ("The home folder taken out before a line is cut…") fails here exactly as it does on unchanged main.
  • Not yet tried with a real controller (none was plugged in), nor on Windows or in Gaming Mode itself. That's why this is WIP.

🤖 Generated with Claude Code

On a ROG Ally or Steam Deck in Steam's Gaming Mode the launcher can only be used with a mouse or the touchscreen, and on a TV its small window sits in the middle with black corners (MagicBeanDev/Longshot#1186). This lets a controller drive the whole launcher, gives Gaming Mode and Big Picture a full-screen TV view, and gives the window its platform's corners. ## Controller - **D-pad or left stick** moves to the next control in that direction (repeats when held). **A** presses it, and opens or picks from a dropdown. **B** closes an open dropdown, else presses the page's or dialog's Back / Cancel / Keep / Decline / Done (`c:Pad.Back="True"`, on every page and dialog but the home). **LB/RB** step through the focus order. **Right stick** scrolls. - Each press is sent as the key a gamepad would send (`KeyDeviceType.Gamepad`), so Avalonia 12's own directional focus (XYFocus) and the controls do the rest. - The first press focuses Play / Build / the page's main button, or a dialog's safe button. While a dialog is open, focus stays in it. The Settings cog is now focusable (up from the top of the home). - **Windows** reads Xbox-type controllers through XInput. **Linux** reads gamepads under `/dev/input`, skipping the ones Steam hides (`SDL_GAMECONTROLLER_IGNORE_DEVICES`). Two copies of one press (Steam's virtual pad and the real one) count once. - If something already turns the pad into keys (Steam's desktop layout), the doubled presses are noticed and the launcher stops reading the pad itself. ## TV view Turned on by `SteamGamepadUI` / `SteamTenfoot` (Gaming Mode, Big Picture) or a gamescope session. The window goes full screen and scales the pages up to the screen, with square corners and no Minimize. **F11** toggles full screen anywhere. `LONGSHOT_LAUNCHER_TV=1` forces it on, `=0` off. ## Corners The fixed 18 px corners become the platform's: 8 px on Windows 11, square on Windows 10, 12 px on GNOME, 8 px on other Linux desktops, square in gamescope. They are square with no border when the window is full screen or maximized, or when the desktop can't draw a see-through window (that was where the black corners came from). ## Screenshots The TV view of the home after a controller's first press: ![TV home](https://git.magicbean.dev/HumanBean/LongshotLauncher/raw/branch/feat/controller-tv/docs/images/tv-home.png) `tools/screenshots` has new scenes: `tv-home`, `tv-settings` (focus moved onto the channel cards without changing the selection) and `tv-dialog` (opens on Decline, and focus stays in the dialog). ## Tests - `tests/launcher_core/PadChecks.cs` covers the repeat timing, dead zones, merging two copies of one controller, Steam's hidden-device list, evdev and XInput decoding, TV detection, the corner sizes, and that every page and dialog has a `c:Pad.Back` button. - `test_release.py` passes. The app builds with no warnings. - `test_launcher_core.py`: 2246 checks pass. `BuildReportChecks` ("The home folder taken out before a line is cut…") fails here exactly as it does on unchanged `main`. - **Not yet tried with a real controller** (none was plugged in), nor on Windows or in Gaming Mode itself. That's why this is WIP. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(controller): a controller moves through the launcher, and Steam's Gaming Mode and Big Picture get a full-screen TV view; the window's corners are the platform's
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 5s
f1dd6beccd
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member

Possibly related, for context:

  • issue MagicBeanDev/Longshot#1186 Idea: Add controller navigation to the Builder on Steam Gaming Mode — Controller navigation and Gaming Mode support requested
Possibly related, for context: - issue MagicBeanDev/Longshot#1186 Idea: Add controller navigation to the Builder on Steam Gaming Mode — Controller navigation and Gaming Mode support requested
HumanBean changed title from WIP: feat(controller): a controller moves through the launcher, and Steam's Gaming Mode gets a full-screen TV view to feat(controller): a controller moves through the launcher, and Steam's Gaming Mode gets a full-screen TV view 2026-11-19 18:09:39 +00:00
HumanBean deleted branch feat/controller-tv 2026-11-19 18:09:44 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!209
No description provided.