From 13a965a9c5ed55eb2eb41cf0647f9a59f4d51d65 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bartosz=20Wo=C5=BAniak?=
<17177420+wozniakpl@users.noreply.github.com>
Date: Tue, 10 Mar 2026 05:15:13 +0100
Subject: [PATCH] Add hotkey descriptions for Escape and Enter actions in
HelpModal (#3382)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
If this PR fixes an issue, link it below. If not, delete these two
lines.
Resolves #3064
## Description:
Adds Esc and Enter to the Help modal hotkeys section with consistent key
styling and descriptions:
- **Esc** – Shown with label; description: "Closes menu. Cancels unit
build preview."
- **Enter (↵)** – Shown with symbol and label; description: "Confirms
input. Confirms unit build preview."
Both keys use the same keycap style as existing hotkeys. Enter label
uses the standard symbol (↵) in `getKeyLabel()`. New strings are in
`en.json` under `help_modal.action_esc` and `help_modal.action_enter`.
## Please complete the following:
- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
## Please put your Discord username so you can be contacted if a bug or
regression is found:
.wozniakpl
---
resources/lang/en.json | 2 ++
src/client/HelpModal.ts | 18 ++++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/resources/lang/en.json b/resources/lang/en.json
index e80177ffc..f0ad48559 100644
--- a/resources/lang/en.json
+++ b/resources/lang/en.json
@@ -89,6 +89,8 @@
"hotkeys": "Hotkeys",
"table_key": "Key",
"table_action": "Action",
+ "action_esc": "Closes menu. Cancels unit build preview.",
+ "action_enter": "Builds unit under cursor",
"action_alt_view": "Alternate view (terrain/countries)",
"action_coordinate_grid": "Toggle coordinate grid overlay",
"action_attack_altclick": "Attack (when left click is set to open menu)",
diff --git a/src/client/HelpModal.ts b/src/client/HelpModal.ts
index 1bab55f1a..c98ce7705 100644
--- a/src/client/HelpModal.ts
+++ b/src/client/HelpModal.ts
@@ -75,6 +75,8 @@ export class HelpModal extends BaseModal {
MetaLeft: "⌘",
MetaRight: "⌘",
Space: "Space",
+ Escape: "Esc",
+ Enter: "↵ Return",
ArrowUp: "↑",
ArrowDown: "↓",
ArrowLeft: "←",
@@ -259,6 +261,22 @@ export class HelpModal extends BaseModal {