Let ctrl-k reach command palette text editing

This commit is contained in:
Lawrence Chen 2026-03-30 18:41:04 -07:00
parent 1dab226bcc
commit 8979c8cabe
No known key found for this signature in database

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