feat(tui,coding-agent): add shell-style keybindings alt+b, alt+f, ctrl+d

- Add alt+b/alt+f as alternative bindings for cursorWordLeft/cursorWordRight
- Add ctrl+d as alternative binding for deleteCharForward
- Fix ctrl+d in custom editor to perform delete when text is present
  (previously it was always consumed, even with non-empty input)

Closes #1043

Co-authored-by: Jason Ish <ish@unx.ca>
This commit is contained in:
Mario Zechner 2026-01-29 00:21:39 +01:00
parent 5ef79459dc
commit 81be81328c
5 changed files with 16 additions and 7 deletions

View file

@ -68,15 +68,15 @@ export const DEFAULT_EDITOR_KEYBINDINGS: Required<EditorKeybindingsConfig> = {
cursorDown: "down",
cursorLeft: "left",
cursorRight: "right",
cursorWordLeft: ["alt+left", "ctrl+left"],
cursorWordRight: ["alt+right", "ctrl+right"],
cursorWordLeft: ["alt+left", "ctrl+left", "alt+b"],
cursorWordRight: ["alt+right", "ctrl+right", "alt+f"],
cursorLineStart: ["home", "ctrl+a"],
cursorLineEnd: ["end", "ctrl+e"],
pageUp: "pageUp",
pageDown: "pageDown",
// Deletion
deleteCharBackward: "backspace",
deleteCharForward: "delete",
deleteCharForward: ["delete", "ctrl+d"],
deleteWordBackward: ["ctrl+w", "alt+backspace"],
deleteWordForward: ["alt+d", "alt+delete"],
deleteToLineStart: "ctrl+u",