Skip to content

fix(outbreak): crouch on Z instead of Ctrl, M opens the map - #419

Merged
kitlangton merged 2 commits into
mainfrom
outbreak-controls-crouch-map
Oct 22, 2026
Merged

kitlangton merged 2 commits into
mainfrom
outbreak-controls-crouch-map

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What it does. Two Oct 21 playtest complaints. "I just closed my game": crouch on Ctrl plus W closed the tab mid-night. And "the map doesn't pop up… It mutes": M muted the game instead of opening the map.

  • Crouch is now Z.
  • M opens the map (N still works). Mute lives on the speaker button.
  • A page can't block Ctrl/Cmd+W: browsers only allow that in fullscreen with Keyboard Lock. So during a night, closing the tab asks first.
  • Lab › Controls › Crouch key / Map key / Ask before closing keep Today one setting away.

How it works.

  • controls/settings.ts maps the settings to physical codes (crouchCodes, mapCodes, muteOnM). The controller, training hint, map legend, Way Out prompt and volume menu all read them. The Ctrl-shortcut suppression only runs with Today's Ctrl crouch.
  • The leave prompt installs one beforeunload listener that checks the latest frame's state when the tab closes. It asks in a co-op room, or more than 30 s into a solo run. It doesn't ask with any menu open (pause included, so Restart, New town and Play seed navigate freely), after the run is over, while you're dead, or under automation. The 30 s restart with each new session.
  • The map legend's Close cap follows the Map key setting every frame, and redraws when the keyboard layout changes.
  • docs/controls.md gains a "Ctrl and Cmd+W" section.

Risk. Client input and HUD only. If the prompt is wrong, you'd see it appear at a menu or not appear mid-night. Players used to Ctrl crouch or M mute get new keys; Today's bindings are one setting away.

Proof. Map legend with M as the close key:

map legend

  • check-cycles, bunx tsc --noEmit and the server tsconfig: pass.
  • bun test on control-keys, input-release, map, death, coop-death-parity, feature-registry and flashlight-inventory: 57 pass.
  • bun run build && bun ../../scripts/smoke.mjs: production smoke passed (Metal).
  • Earlier scripts/controls-proof.ts run with real keys: Z crouches, Ctrl doesn't, M opens the map and doesn't mute, N still opens it.

… speaker button

Playtest Oct 21: "I always accidentally end up hitting Ctrl W in these games, I'm trying to crouch and move
forward" (1:19:28, after "I just closed my game"), and "the map doesn't pop up if I press it. It mutes" (1:43:52).

- Crouch holds Z (beside left Shift, free on foot). Browsers never hand Ctrl/Cmd+W to the page, so during a night
  closing the tab asks first (beforeunload; not under automation).
- M opens and closes the map (N still does); mute is on the speaker button. The Mute row shows its M cap only with
  Today's binding.
- Prompts follow the bindings: training crouch hint, map legend, Way Out "pinned" caps, Lab station notes.
- Lab > Controls > Crouch key / Map key keep Today one setting away; docs/controls.md gains a Ctrl and Cmd+W rule.
@kitlangton
kitlangton force-pushed the outbreak-controls-crouch-map branch from 12a67de to 5224cd6 Compare October 22, 2026 10:27
@kitlangton
kitlangton merged commit e1c6a54 into main Oct 22, 2026
3 checks passed
@kitlangton
kitlangton deleted the outbreak-controls-crouch-map branch October 22, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant