diff --git a/src/client/HelpModal.ts b/src/client/HelpModal.ts index 619977fa8..9a710142f 100644 --- a/src/client/HelpModal.ts +++ b/src/client/HelpModal.ts @@ -384,7 +384,8 @@ export class HelpModal extends BaseModal {
- ${this.renderKey(keybinds.emojiMenuModifier)} + ${this.renderKey("Alt")} + + ${this.renderKey(keybinds.resetGfx)}
diff --git a/src/client/UserSettingModal.ts b/src/client/UserSettingModal.ts index 63866f761..841ba9b63 100644 --- a/src/client/UserSettingModal.ts +++ b/src/client/UserSettingModal.ts @@ -90,8 +90,9 @@ export class UserSettingModal extends BaseModal { const { action, value, prevValue } = e.detail; let { key } = e.detail; + // TODO: remove after testing console.info( - "handleKeybindChange recieved value: " + value, + "handleKeybindChange received value: " + value, ", key: " + key, ); diff --git a/src/client/Utils.ts b/src/client/Utils.ts index 2de76bf6d..aaee2ab73 100644 --- a/src/client/Utils.ts +++ b/src/client/Utils.ts @@ -380,7 +380,7 @@ export function formatKeyForDisplay(value: string): string { Backslash: "\\", Shift: "Shift ⇧", ShiftLeft: "Shift ⇧", - ShiftRight: "Shift ⇧", + ShiftRight: "⇧ Shift", Control: "Ctrl", // "Alt Gr" emits ControlLeft+Alt in Windows on many keyboard layouts and we catch the first code. // Is undiscernable normally from ControlLeft but user sees "alt gr" on the key so display it too @@ -389,7 +389,7 @@ export function formatKeyForDisplay(value: string): string { Alt: Platform.isMac ? "⌥" : "Alt", AltLeft: Platform.isMac ? "⌥" : "Alt", AltRight: Platform.isMac ? "⌥" : "Alt", - Metat: Platform.isMac ? "⌘" : "⊞", + Meta: Platform.isMac ? "⌘" : "⊞", MetaLeft: Platform.isMac ? "⌘" : "⊞", //"⊞" is Windows key, "⌘" is Command key on Mac MetaRight: Platform.isMac ? "⌘" : "⊞", Escape: "Esc", // Cannot be bound to action by user, but used as reserved key diff --git a/tests/InputHandler.test.ts b/tests/InputHandler.test.ts index ca6b3a006..f76aab03f 100644 --- a/tests/InputHandler.test.ts +++ b/tests/InputHandler.test.ts @@ -909,11 +909,11 @@ describe("Warship box selection (Shift+drag)", () => { expect(mockCanvas.style.cursor).toBe("crosshair"); }); - test("ShiftRight keydown also sets cursor to crosshair", () => { + test("ShiftRight keydown does not set cursor to crosshair", () => { // ShiftRight is not the default shiftKey keybind (ShiftLeft is). // This test verifies the configured shiftKey works, not a hardcoded ShiftRight. - window.dispatchEvent(new KeyboardEvent("keydown", { code: "ShiftLeft" })); - expect(mockCanvas.style.cursor).toBe("crosshair"); + window.dispatchEvent(new KeyboardEvent("keydown", { code: "ShiftRight" })); + expect(mockCanvas.style.cursor).not.toBe("crosshair"); }); test("Shift keyup resets cursor when no selection box active", () => {