terminal: Fix alt-f and alt-b behavior (#23741)

curiouslad created

Fixes alt+f and alt+b (word forward and word backward) behavior in
terminal

Release Notes:

- N/A

Change summary

assets/keymaps/default-linux.json | 2 ++
assets/keymaps/default-macos.json | 2 ++
2 files changed, 4 insertions(+)

Detailed changes

assets/keymaps/default-linux.json 🔗

@@ -798,6 +798,8 @@
       "shift-insert": "terminal::Paste",
       "ctrl-shift-v": "terminal::Paste",
       "ctrl-enter": "assistant::InlineAssist",
+      "alt-b": ["terminal::SendText", "\u001bb"],
+      "alt-f": ["terminal::SendText", "\u001bf"],
       // Overrides for conflicting keybindings
       "ctrl-w": ["terminal::SendKeystroke", "ctrl-w"],
       "ctrl-shift-a": "editor::SelectAll",

assets/keymaps/default-macos.json 🔗

@@ -834,6 +834,8 @@
       // Terminal.app compatibility
       "alt-left": ["terminal::SendText", "\u001bb"],
       "alt-right": ["terminal::SendText", "\u001bf"],
+      "alt-b": ["terminal::SendText", "\u001bb"],
+      "alt-f": ["terminal::SendText", "\u001bf"],
       // There are conflicting bindings for these keys in the global context.
       // these bindings override them, remove at your own risk:
       "up": ["terminal::SendKeystroke", "up"],