diff --git a/config/alacritty/alacritty.toml b/config/alacritty/alacritty.toml index f016c07a..dcf34042 100644 --- a/config/alacritty/alacritty.toml +++ b/config/alacritty/alacritty.toml @@ -20,5 +20,6 @@ decorations = "None" [keyboard] bindings = [ { key = "Insert", mods = "Shift", action = "Paste" }, -{ key = "Insert", mods = "Control", action = "Copy" } +{ key = "Insert", mods = "Control", action = "Copy" }, +{ key = "Return", mods = "Shift", chars = "\u001B\r" } ] diff --git a/migrations/1772988614.sh b/migrations/1772988614.sh new file mode 100755 index 00000000..87b9726b --- /dev/null +++ b/migrations/1772988614.sh @@ -0,0 +1,7 @@ +echo "Add Shift+Return keyboard binding for multi-line as used by Claude Code to Alacritty" + +ALACRITTY_CONFIG=~/.config/alacritty/alacritty.toml + +if [[ -f $ALACRITTY_CONFIG ]] && ! grep -q 'key = "Return"' "$ALACRITTY_CONFIG"; then + sed -i 's/{ key = "Insert", mods = "Control", action = "Copy" }/{ key = "Insert", mods = "Control", action = "Copy" },\n { key = "Return", mods = "Shift", chars = "\\u001B\\r" }/' "$ALACRITTY_CONFIG" +fi