diff --git a/client/public/version.js b/client/public/version.js index 668f82c..ea3952f 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.08 R337"; +window.CHGRID_WEB_VERSION = "2026.03.08 R338"; // 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 b5aca81..3e8469b 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -2607,6 +2607,10 @@ function canOpenCommandPaletteInMode(mode: GameMode): boolean { return mode === 'normal' || mode === 'pianoUse' || mode === 'commandPalette'; } +function shouldForwardPianoKeyUp(currentMode: GameMode): boolean { + return currentMode === 'pianoUse' || (currentMode === 'commandPalette' && commandPaletteReturnMode === 'pianoUse'); +} + function openCommandPalette(): void { const sourceMode = state.mode; if (sourceMode === 'commandPalette') { @@ -3772,8 +3776,8 @@ function setupInputHandlers(): void { document.addEventListener('keyup', (event) => { const code = normalizeInputCode(event); - if (state.mode === 'pianoUse' && code) { - itemBehaviorRegistry.handleModeKeyUp(state.mode, { + if (code && shouldForwardPianoKeyUp(state.mode)) { + itemBehaviorRegistry.handleModeKeyUp('pianoUse', { code, shiftKey: event.shiftKey, });