viewer: slow flight on C instead of Ctrl (VIEWER-SLOW-KEY-CTRL-W) #2243

Open
github-bot wants to merge 1 commit from github-bot/gh-2243 into main AGit
Owner

@⁠syfyra on GitHub · 2026-11-26 10:11 UTC · original
syfyra:fix/viewer-slow-key → main · +14 −6 · 2 files · 1 commits · draft

Claimed in the coordination issue as: VIEWER-SLOW-KEY-CTRL-W (claim comment to follow)

What and why

The map viewer's help line says Ctrl slows the camera while W A S D and Q/E move it. Holding Ctrl and a movement key is a browser shortcut on Windows and Linux:

keys browser
Ctrl+W (slow forward) closes the tab; Chromium and Firefox reserve it, so a page cannot cancel it
Ctrl+S (slow back) opens the save-page dialog
Ctrl+D (slow right) opens the bookmark dialog
Ctrl+E (slow up) moves the focus to the address bar

The keydown handler leaves modified keys to the browser on purpose, so slow flight forward closes the viewer with the camera position, and most other slow directions leave the page.

Slow is now the C key, which no browser binds; Shift stays fast, and Ctrl no longer changes the speed. The help line says C slow. On macOS Ctrl+W does nothing, but one binding for every platform keeps the help line true.

Tested

  • node --test tests/test_viewer_streaming.cjs (Node 26): the existing speed test now checks that C slows the camera to a fifth, that Shift and C together cancel out, that ControlLeft/ControlRight leave the speed alone, and that the help line names C and not Ctrl. On main it fails (<kbd>C</kbd> slow missing); with the change all 57 tests pass.
  • Merges cleanly with #651 and #918, which also change viewer/index.html and this test file.
  • Not checked by hand in a browser: the change is the key code in the speed factor and the help text.
  • scripts/check_no_game_data.py on both files.

GPUs tested: n/a (viewer logic, Node harness)

AI-assisted: yes (Claude Code, Claude Opus 5.5)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

**@⁠syfyra** on GitHub · 2026-11-26 10:11 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2243) `syfyra:fix/viewer-slow-key` → `main` · +14 −6 · 2 files · 1 commits · draft Claimed in the coordination issue as: VIEWER-SLOW-KEY-CTRL-W (claim comment to follow) ### What and why The map viewer's help line says `Ctrl` slows the camera while `W A S D` and `Q`/`E` move it. Holding Ctrl and a movement key is a browser shortcut on Windows and Linux: | keys | browser | |---|---| | Ctrl+W (slow forward) | closes the tab; Chromium and Firefox reserve it, so a page cannot cancel it | | Ctrl+S (slow back) | opens the save-page dialog | | Ctrl+D (slow right) | opens the bookmark dialog | | Ctrl+E (slow up) | moves the focus to the address bar | The keydown handler leaves modified keys to the browser on purpose, so slow flight forward closes the viewer with the camera position, and most other slow directions leave the page. Slow is now the `C` key, which no browser binds; `Shift` stays fast, and Ctrl no longer changes the speed. The help line says `C` slow. On macOS Ctrl+W does nothing, but one binding for every platform keeps the help line true. ### Tested - `node --test tests/test_viewer_streaming.cjs` (Node 26): the existing speed test now checks that `C` slows the camera to a fifth, that Shift and C together cancel out, that `ControlLeft`/`ControlRight` leave the speed alone, and that the help line names `C` and not Ctrl. On `main` it fails (`<kbd>C</kbd> slow` missing); with the change all 57 tests pass. - Merges cleanly with #651 and #918, which also change `viewer/index.html` and this test file. - Not checked by hand in a browser: the change is the key code in the speed factor and the help text. - `scripts/check_no_game_data.py` on both files. GPUs tested: n/a (viewer logic, Node harness) AI-assisted: yes (Claude Code, Claude Opus 5.5) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The help line offered Ctrl as the slow modifier for W A S D and Q/E, but
with a movement key held Ctrl makes a browser shortcut: Ctrl+W closes
the tab (a page cannot cancel it in Chromium or Firefox), Ctrl+S and
Ctrl+D open the save-page and bookmark dialogs and Ctrl+E moves the
focus to the address bar. The keydown handler leaves modified keys to
the browser, so slow flight forward lost the whole viewer, and every
other slow direction left the page.

Slow is now the C key, which no browser binds. Ctrl leaves the speed
alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 11:24:18 +00:00
Author
Owner

@⁠lixonik on GitHub · 2026-11-26 11:08 UTC · original · reviewed

Windows 11: 57/57 viewer Node tests passed, including C slow flight, Shift plus C, both Ctrl keys leaving speed unchanged, and the help binding. The keyboard checks use the viewer test harness. A physical browser input session was outside this run. No findings.

AI-assisted.

**@⁠lixonik** on GitHub · 2026-11-26 11:08 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2243#pullrequestreview-6073066692) · **reviewed** Windows 11: 57/57 viewer Node tests passed, including C slow flight, Shift plus C, both Ctrl keys leaving speed unchanged, and the help binding. The keyboard checks use the viewer test harness. A physical browser input session was outside this run. No findings. AI-assisted.
Author
Owner

@⁠kurrutako on GitHub · 2026-11-26 14:18 UTC · original

Verified at head 393dab2e7, merged into current main 73516a290 (newer than the merge-base a73a57e13 of lixonik's run).

  • node --test tests/test_viewer_streaming.cjs: 57 of 57 pass, 3 of 3 runs.
  • The updated speed test fails on main when it is run against main's viewer/index.html, and passes with the PR.
  • Merged together with #2329 (both change viewer/index.html and this test file): the merge is automatic, with no conflicts, and 58 of 58 pass.
  • KeyC has no other binding in the viewer.
  • python -I scripts/check_no_game_data.py on both changed files: clean.

Windows 11, Node.js 24.15.0. No browser, GPU or game files.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠kurrutako** on GitHub · 2026-11-26 14:18 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2243#issuecomment-7194596522) Verified at head `393dab2e7`, merged into current `main` `73516a290` (newer than the merge-base `a73a57e13` of lixonik's run). - `node --test tests/test_viewer_streaming.cjs`: 57 of 57 pass, 3 of 3 runs. - The updated speed test fails on `main` when it is run against `main`'s `viewer/index.html`, and passes with the PR. - Merged together with #2329 (both change `viewer/index.html` and this test file): the merge is automatic, with no conflicts, and 58 of 58 pass. - `KeyC` has no other binding in the viewer. - `python -I scripts/check_no_game_data.py` on both changed files: clean. Windows 11, Node.js 24.15.0. No browser, GPU or game files. AI-assisted (Claude Code, Claude Opus 5.5).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2243/head:github-bot/gh-2243'
git switch 'github-bot/gh-2243'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2243'
git switch 'github-bot/gh-2243'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2243'
git switch 'github-bot/gh-2243'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2243'
git switch 'main'
git merge --squash 'github-bot/gh-2243'
git switch 'main'
git merge --ff-only 'github-bot/gh-2243'
git switch 'main'
git merge 'github-bot/gh-2243'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.