Let ctrl-k reach command palette text editing
This commit is contained in:
parent
1dab226bcc
commit
8979c8cabe
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue