From e584586cb03144ee82b21fa73ebb1c07e6917455 Mon Sep 17 00:00:00 2001 From: curiouslad Date: Wed, 29 Jan 2025 23:01:25 +0100 Subject: [PATCH] terminal: Fix alt-f and alt-b behavior (#23741) Fixes alt+f and alt+b (word forward and word backward) behavior in terminal Release Notes: - N/A --- assets/keymaps/default-linux.json | 2 ++ assets/keymaps/default-macos.json | 2 ++ 2 files changed, 4 insertions(+) diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.json index c11a54a1d481d18796a4c0143b4c4725cdd2c097..a5b062c22a7a1d7735ada9636cfce6a76e80ad07 100644 --- a/assets/keymaps/default-linux.json +++ b/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", diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.json index a4e7981c55cf809407228cea12cc326acd884ba5..693337f6446e4c420f3d034d7f5fa180014a0150 100644 --- a/assets/keymaps/default-macos.json +++ b/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"],