WIP: feat(menu): Steam's on-screen keyboard for text fields on a Steam Deck and in Big Picture #3134

Draft
HumanBean wants to merge 1 commit from HumanBean/Longshot:feat/steam-keyboard into main
Owner

Summary

Work in progress: nothing of this has run on a Steam Deck or in Big Picture.

On a Steam Deck and in Steam's Big Picture, typing into a text field of the menu (the settings search, for one) now brings
up Steam's own on-screen keyboard, and puts it away when the field gives the keyboard up. The menu's ABC keys stay
as they are.

  • The renderer already tells the host when a field takes and gives up the keyboard (host_take_text, host/rx_backend.c).
    There the game asks the builder, with a new one-way op keyboard {"on": bool}.
  • The builder opens steam://open/keyboard or steam://close/keyboard (build_driver::game_ops). The game picks which
    of the two and never names a link. It works only where SteamDeck, SteamGamepadUI or SteamTenfoot is 1.
  • While such a field is typed into, key presses count whatever Controls > Keyboard says: with Auto and a controller
    connected they would be dropped, and this keyboard is the controller's way to type.

Read first: builder/crates/build-driver/src/game_ops.rs (keyboard), game_builder_keyboard in
game/crates/longshot-game/src/builder_link.rs, and the change in host/rx_backend.c.

Testing

Tested: nothing in the game, at the author's request. Linux, game-free: build-driver's keyboard, channel and
game_ops tests (31 passed), longshot-game's builder_link tests (44 passed), cargo check --all-targets for both,
game/game.h regenerated, and test_menu_text_field, test_text_keyboard_policy and test_builder_channel.
host/rx_backend.c has not been built as part of the game.

Still to test:

  • Steam Deck, Game Mode: open the Insert menu, go to Search settings, press Enter; expect Steam's keyboard, typed letters
    in the field, and the keyboard gone after Esc or B (by hand).
  • Steam Deck, Desktop Mode and Big Picture on a PC: the same (by hand).
  • Steam Deck with Controls > Keyboard on Auto: the typed letters still arrive (by hand).
  • A PC outside Big Picture, Linux and Windows: no keyboard comes up and typing works as before (by hand).

Measurements

Nothing to measure: one request when a text field takes or gives up the keyboard, sent from a thread of its own.

Risks

  • Not known to work: whether Steam's keys reach the field, and whether its keyboard covers the field, needs a Deck.
  • Docked Deck with a real keyboard: Steam's keyboard comes up there too.
  • SDL may show the same keyboard itself in some sessions; showing it twice should do nothing.
  • Older builder: one that does not serve keyboard is never asked.
  • Saves and options: nothing changes. A revert is enough.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says. (not run: no Steam Deck, and the author asked for no testing)
  • mise run test passes (any failure that also fails on main is named). (not run)
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (not built)
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ

## Summary **Work in progress:** nothing of this has run on a Steam Deck or in Big Picture. On a Steam Deck and in Steam's Big Picture, typing into a text field of the menu (the settings search, for one) now brings up Steam's own on-screen keyboard, and puts it away when the field gives the keyboard up. The menu's **ABC** keys stay as they are. - The renderer already tells the host when a field takes and gives up the keyboard (`host_take_text`, `host/rx_backend.c`). There the game asks the builder, with a new one-way op `keyboard {"on": bool}`. - The builder opens `steam://open/keyboard` or `steam://close/keyboard` (`build_driver::game_ops`). The game picks which of the two and never names a link. It works only where `SteamDeck`, `SteamGamepadUI` or `SteamTenfoot` is `1`. - While such a field is typed into, key presses count whatever **Controls > Keyboard** says: with Auto and a controller connected they would be dropped, and this keyboard is the controller's way to type. Read first: `builder/crates/build-driver/src/game_ops.rs` (`keyboard`), `game_builder_keyboard` in `game/crates/longshot-game/src/builder_link.rs`, and the change in `host/rx_backend.c`. ## Testing **Tested:** nothing in the game, at the author's request. Linux, game-free: `build-driver`'s keyboard, channel and `game_ops` tests (31 passed), `longshot-game`'s `builder_link` tests (44 passed), `cargo check --all-targets` for both, `game/game.h` regenerated, and `test_menu_text_field`, `test_text_keyboard_policy` and `test_builder_channel`. `host/rx_backend.c` has not been built as part of the game. **Still to test:** - Steam Deck, Game Mode: open the Insert menu, go to Search settings, press Enter; expect Steam's keyboard, typed letters in the field, and the keyboard gone after Esc or B (by hand). - Steam Deck, Desktop Mode and Big Picture on a PC: the same (by hand). - Steam Deck with Controls > Keyboard on Auto: the typed letters still arrive (by hand). - A PC outside Big Picture, Linux and Windows: no keyboard comes up and typing works as before (by hand). ## Measurements Nothing to measure: one request when a text field takes or gives up the keyboard, sent from a thread of its own. ## Risks - **Not known to work:** whether Steam's keys reach the field, and whether its keyboard covers the field, needs a Deck. - **Docked Deck with a real keyboard:** Steam's keyboard comes up there too. - **SDL** may show the same keyboard itself in some sessions; showing it twice should do nothing. - **Older builder:** one that does not serve `keyboard` is never asked. - **Saves and options:** nothing changes. A revert is enough. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [ ] Tested on my own PC, in the game for a change the game runs, as Testing says. (not run: no Steam Deck, and the author asked for no testing) - [ ] `mise run test` passes (any failure that also fails on `main` is named). (not run) - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (not built) - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ
feat(menu): Steam's on-screen keyboard comes up for a text field on a Steam Deck and in Big Picture
Some checks failed
CI / What the change needs (pull_request) Successful in 7s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
PR description / Title and description (pull_request_target) Successful in 5s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 19s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m28s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 12m3s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 15m59s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 16m49s
CI / Website build and checks (pull_request) Failing after 1m8s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 14m55s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 51m16s
6c83d5dce9
The game asks the builder, which opens one of two fixed steam:// links. The keys count whatever Controls >
Keyboard says while the field is typed into, as it is the controller's way to type.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017vw8e2fJhRpDrY7pgVx6oJ
Member

Possibly related, for context:

  • issue #3129 Game: Insert and Shift+Insert close the Insert menu while a text field is edited — Open bug involving keyboard handling while menu text fields are edited
Possibly related, for context: - issue #3129 Game: Insert and Shift+Insert close the Insert menu while a text field is edited — Open bug involving keyboard handling while menu text fields are edited
Some checks failed
CI / What the change needs (pull_request) Successful in 7s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
PR description / Title and description (pull_request_target) Successful in 5s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 19s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m28s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 12m3s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 15m59s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 16m49s
CI / Website build and checks (pull_request) Failing after 1m8s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 14m55s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 51m16s
This pull request has changes conflicting with the target branch.
  • docs/user/graphics-and-controls.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/steam-keyboard:HumanBean-feat/steam-keyboard'
git switch 'HumanBean-feat/steam-keyboard'
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/Longshot!3134
No description provided.