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

Open
opened 2026-11-26 21:20:32 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2243
Author: @syfyra
Created: 11/26/2026
Status: 🔄 Open

Base: main ← Head: fix/viewer-slow-key


📝 Commits (1)

  • 393dab2 viewer: slow flight on C instead of Ctrl (VIEWER-SLOW-KEY-CTRL-W)

📊 Changes

2 files changed (+14 additions, -6 deletions)

View changed files

📝 tests/test_viewer_streaming.cjs (+9 -3)
📝 viewer/index.html (+5 -3)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2243 **Author:** [@syfyra](https://github.com/syfyra) **Created:** 11/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/viewer-slow-key` --- ### 📝 Commits (1) - [`393dab2`](https://github.com/ubiquitarianism/leonida/commit/393dab2e73473e232e1dc7f42eef70d4f4d1790d) viewer: slow flight on C instead of Ctrl (VIEWER-SLOW-KEY-CTRL-W) ### 📊 Changes **2 files changed** (+14 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_viewer_streaming.cjs` (+9 -3) 📝 `viewer/index.html` (+5 -3) </details> ### 📄 Description 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
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
starred/leonida#2246
No description provided.