Merge pull request #2394 from manaflow-ai/task-ctrl-k-command-palette

Fix Ctrl+K in the command palette
This commit is contained in:
Lawrence Chen 2026-03-30 21:00:21 -07:00 committed by GitHub
commit 56deaf66e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 102 additions and 24 deletions

View file

@ -1620,10 +1620,10 @@ func commandPaletteSelectionDeltaForKeyboardNavigation(
if normalizedFlags == [.control] {
// Control modifiers can surface as either printable chars or ASCII control chars.
// Keep Emacs-style next/previous navigation, but leave other control bindings
// (for example Ctrl+K text editing in the palette search field) to AppKit.
if keyCode == 45 || normalizedChars == "n" || normalizedChars == "\u{0e}" { return 1 } // Ctrl+N
if keyCode == 35 || normalizedChars == "p" || normalizedChars == "\u{10}" { return -1 } // Ctrl+P
if keyCode == 38 || normalizedChars == "j" || normalizedChars == "\u{0a}" { return 1 } // Ctrl+J
if keyCode == 40 || normalizedChars == "k" || normalizedChars == "\u{0b}" { return -1 } // Ctrl+K
}
return nil

View file

@ -4538,7 +4538,6 @@ struct ContentView: View {
}
return currentMatchingQuery == resolvedMatchingQuery
|| currentMatchingQuery.hasPrefix(resolvedMatchingQuery)
}
private func scheduleCommandPaletteResultsRefresh(