[#5356] Minor fix: Remove duplicate binding and add complete navigation command (#5884)

Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
Lee Won Jun
2025-08-10 07:28:28 +09:00
committed by GitHub
parent 0dea7233b6
commit c632ec8b03
3 changed files with 34 additions and 42 deletions

View File

@@ -32,6 +32,8 @@ export enum Command {
// Auto-completion
ACCEPT_SUGGESTION = 'acceptSuggestion',
COMPLETION_UP = 'completionUp',
COMPLETION_DOWN = 'completionDown',
// Text input
SUBMIT = 'submit',
@@ -121,6 +123,9 @@ export const defaultKeyBindings: KeyBindingConfig = {
// Auto-completion
// Original: key.name === 'tab' || (key.name === 'return' && !key.ctrl)
[Command.ACCEPT_SUGGESTION]: [{ key: 'tab' }, { key: 'return', ctrl: false }],
// Completion navigation (arrow or Ctrl+P/N)
[Command.COMPLETION_UP]: [{ key: 'up' }, { key: 'p', ctrl: true }],
[Command.COMPLETION_DOWN]: [{ key: 'down' }, { key: 'n', ctrl: true }],
// Text input
// Original: key.name === 'return' && !key.ctrl && !key.meta && !key.paste
@@ -157,15 +162,9 @@ export const defaultKeyBindings: KeyBindingConfig = {
// Original: key.ctrl && key.name === 'e'
[Command.TOGGLE_IDE_CONTEXT_DETAIL]: [{ key: 'e', ctrl: true }],
// Original: key.ctrl && (key.name === 'c' || key.name === 'C')
[Command.QUIT]: [
{ key: 'c', ctrl: true },
{ key: 'C', ctrl: true },
],
[Command.QUIT]: [{ key: 'c', ctrl: true }],
// Original: key.ctrl && (key.name === 'd' || key.name === 'D')
[Command.EXIT]: [
{ key: 'd', ctrl: true },
{ key: 'D', ctrl: true },
],
[Command.EXIT]: [{ key: 'd', ctrl: true }],
// Original: key.ctrl && key.name === 's'
[Command.SHOW_MORE_LINES]: [{ key: 's', ctrl: true }],