Add hotkey descriptions for Escape and Enter actions in HelpModal (#3382)

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`.

<img width="723" height="427" alt="image"
src="https://github.com/user-attachments/assets/52fc168a-a850-4ac5-ba82-72f7672f476c"
/>


## 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
This commit is contained in:
Bartosz Woźniak
2026-03-10 05:15:13 +01:00
committed by GitHub
parent 3838de1d30
commit 13a965a9c5
2 changed files with 20 additions and 0 deletions
+2
View File
@@ -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)",
+18
View File
@@ -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 {
</tr>
</thead>
<tbody class="text-white/80">
<tr class="hover:bg-white/5 transition-colors">
<td class="py-3 pl-4 border-b border-white/5">
${this.renderKey("Escape")}
</td>
<td class="py-3 border-b border-white/5 text-white/70">
${translateText("help_modal.action_esc")}
</td>
</tr>
<tr class="hover:bg-white/5 transition-colors">
<td class="py-3 pl-4 border-b border-white/5">
${this.renderKey("Enter")}
</td>
<td class="py-3 border-b border-white/5 text-white/70">
${translateText("help_modal.action_enter")}
</td>
</tr>
<tr class="hover:bg-white/5 transition-colors">
<td class="py-3 pl-4 border-b border-white/5">
${this.renderKey(keybinds.toggleView)}