From 5de59cd4ed736efa5219cf8849a645cff5de0c9e Mon Sep 17 00:00:00 2001 From: CHE-3 Date: Sun, 22 Mar 2026 19:38:38 -0400 Subject: [PATCH] fix: stop consuming repeated Escape keys after command palette dismissal The `shouldConsumeSuppressedEscape` function had an early return that unconditionally consumed all repeated Escape key events (`isARepeat`), regardless of whether the suppression window had expired. This caused Escape presses to be swallowed in TUI apps (e.g. lazygit) running in panels, because the repeat events never reached the active responder. Removing the `isARepeat` guard lets repeated Escapes fall through to the existing time-based check (0.35s window), which correctly expires and stops consuming events after the command palette is dismissed. Fixes #1610 Co-Authored-By: Claude Opus 4.6 (1M context) --- Sources/AppDelegate.swift | 3 --- 1 file changed, 3 deletions(-) diff --git a/Sources/AppDelegate.swift b/Sources/AppDelegate.swift index d7da8180..a78558c8 100644 --- a/Sources/AppDelegate.swift +++ b/Sources/AppDelegate.swift @@ -4452,9 +4452,6 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent commandPaletteEscapeSuppressionByWindowId.contains(windowId) else { return false } - if event.isARepeat { - return true - } let startedAt = commandPaletteEscapeSuppressionStartedAtByWindowId[windowId] ?? 0 if ProcessInfo.processInfo.systemUptime - startedAt <= 0.35 { return true