diff --git a/client/public/version.js b/client/public/version.js index 86bfd8f..99d6b09 100644 --- a/client/public/version.js +++ b/client/public/version.js @@ -1,5 +1,5 @@ // Maintainer-controlled web client version. // Format: YYYY.MM.DD Rn (example: 2026.02.20 R2) -window.CHGRID_WEB_VERSION = "2026.03.01 R333"; +window.CHGRID_WEB_VERSION = "2026.03.01 R334"; // Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid. window.CHGRID_TIME_ZONE = "America/Detroit"; diff --git a/client/src/main.ts b/client/src/main.ts index 45410e6..279fe6e 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -3502,6 +3502,7 @@ function setupInputHandlers(): void { document.addEventListener('keydown', (event) => { const code = normalizeInputCode(event); if (!code) return; + const hasShortcutModifier = event.ctrlKey || event.metaKey; if (!dom.settingsModal.classList.contains('hidden') && code === 'Escape') { closeSettings(); @@ -3511,18 +3512,18 @@ function setupInputHandlers(): void { if (!state.running) return; if (document.activeElement !== dom.canvas) return; if (event.altKey) return; - if (event.ctrlKey && !isTextEditingMode(state.mode)) return; + if (hasShortcutModifier && !isTextEditingMode(state.mode)) return; if (activeTeleport && code.startsWith('Arrow')) { event.preventDefault(); return; } - const isNativePasteShortcut = event.ctrlKey && isTextEditingMode(state.mode) && code === 'KeyV'; + const isNativePasteShortcut = hasShortcutModifier && isTextEditingMode(state.mode) && code === 'KeyV'; if ((state.mode !== 'normal' || !code.startsWith('Arrow')) && !isNativePasteShortcut) { event.preventDefault(); } - if (event.ctrlKey && isTextEditingMode(state.mode)) { + if (hasShortcutModifier && isTextEditingMode(state.mode)) { if (code === 'KeyV') { return; } @@ -3551,7 +3552,7 @@ function setupInputHandlers(): void { mode: state.mode, code, key: event.key, - ctrlKey: event.ctrlKey, + ctrlKey: hasShortcutModifier, shiftKey: event.shiftKey, handlers: { nickname: handleNicknameModeInput, diff --git a/docs/controls.md b/docs/controls.md index 28296b0..7a36ff3 100644 --- a/docs/controls.md +++ b/docs/controls.md @@ -63,6 +63,7 @@ This document is the authoritative keymap for the client. - `Ctrl+C`: Copy current text - `Ctrl+X`: Cut current text - `Ctrl+V`: Paste +- `Cmd+A` / `Cmd+C` / `Cmd+X` / `Cmd+V` (macOS): same behavior as `Ctrl` shortcuts above ## Numeric Edit Fields