LARP_PROMPTS=auto: keyboard key caps for mouse & keyboard players #136
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp!136
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-136"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@IndianStalker on GitHub · 2026-12-05 19:27 UTC · original
IndianStalker:prompts-auto→main· +113 −7 · 4 files · 1 commits · merged 2026-12-05 21:02 UTCWhat
Until now
LARP_PROMPTS=auto(the default) only chose between PlayStation symbols (a DualSense/DS4 connected) and the stock Xbox prompts. Mouse & keyboard players saw controller icons unless they editedbin\launch.ps1, and with a PlayStation pad merely paired they got PS symbols while playing on the keyboard.autonow picks once at start:LARP_CONTROLS=mnkLARP_CONTROLS=pad, or an XInput pad is connectedExplicit values (
keys,xbox,playstation) behave exactly as before.How
apps/larp/src/run.rs: theautobranch callsauto_prompt_style(), which logs its pick (prompts: LARP_PROMPTS=auto picked the button style). The decision itself is a small pure function,pick_prompt_style(mode, ps_pad, xinput_pad), with 5 unit tests.crates/larp-hle/src/modules/gameinput.rs:xinput_pad_present()asks the four XInput slots once. It is only called when the earlier rules don't decide, because an empty slot can take ~67 ms to answer.environment-variables.mdandcontrols-and-input.mddescribe the newauto.The style is still chosen once at start (the title loads its icon movie once), so switching live between keyboard and pad is not part of this.
Tested
cargo build --release --locked -p larp: builds with no new warnings.cargo test -p larp prompt_style: 5 passed.🤖 Generated with Claude Code
Until now `auto` only chose between PlayStation symbols (a DualSense/DS4 connected) and the stock Xbox prompts, so mouse & keyboard players saw controller icons unless they edited launch.ps1. `auto` now picks once at start: - LARP_CONTROLS=mnk -> keyboard key caps - a DualSense/DS4 is connected -> PlayStation symbols - LARP_CONTROLS=pad, or an XInput pad -> stock Xbox prompts - no controller connected at all -> keyboard key caps The choice is logged ("prompts: LARP_PROMPTS=auto picked the button style"). Explicit LARP_PROMPTS values are unchanged. The XInput check is only asked when the earlier rules don't decide (an empty slot can take ~67 ms). The decision is a small pure function with unit tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>@HeyOkay on GitHub · 2026-12-06 01:58 UTC · original
This default makes no sense for mixed-input/controller users. After updating to v1.1.6, I ended up with keyboard prompts when I wanted to play with a controller.
Why make this the default
autobehavior while the choice is frozen at startup? If a controller is connected or becomes available after launch, the prompts remain wrong, and users have to edit launch.ps1 or restart the game to fix them.autoshould follow the last device actually used: controller input should show the appropriate Xbox/PlayStation buttons, and keyboard/mouse input should show key caps.I see the note that the title loads its icon movie once. Is refreshing/replacing those icons at runtime technically blocked, or was it simply outside this PR's scope? That constraint explains the implementation, but it does not make startup-only selection a good default.
Please implement dynamic switching on input-device changes. Until that is available, keyboard prompts should be opt-in, or there should at least be an obvious in-game override that does not require restarting.