diff --git a/js/plugins/MinimapZoom.js b/js/plugins/MinimapZoom.js index 6ded3ff..fdc9f2d 100644 --- a/js/plugins/MinimapZoom.js +++ b/js/plugins/MinimapZoom.js @@ -133,8 +133,8 @@ Input.keyMapper[toggleKeyCode] = 'minimap'; Input.keyMapper[82] = 'minimapReset'; // R key - Input.keyMapper[16] = 'minimapZoomIn'; // Shift key - Input.keyMapper[17] = 'minimapZoomOut'; // Ctrl key + // Note: Shift (16) and Ctrl (17) are checked directly in updateMinimapZoomPan + // to avoid interfering with game controls when minimap is not active //========================================================================= // Auto-close minimap when any event starts @@ -524,12 +524,16 @@ let zoomChanged = false; let panChanged = false; - // Zoom controls - if (Input.isTriggered('minimapZoomIn') || Input.isRepeated('minimapZoomIn')) { + // Zoom controls - check raw key state directly only when minimap is active + // This prevents Shift/Ctrl from being captured when minimap is closed + const shiftPressed = Input._currentState['shift']; + const ctrlPressed = Input._currentState['control']; + + if (shiftPressed) { minimapZoom = Math.min(MAX_ZOOM, minimapZoom + ZOOM_STEP); zoomChanged = true; } - if (Input.isTriggered('minimapZoomOut') || Input.isRepeated('minimapZoomOut')) { + if (ctrlPressed) { minimapZoom = Math.max(MIN_ZOOM, minimapZoom - ZOOM_STEP); zoomChanged = true; }