Add Shift+Return keyboard binding for multi-line as used by Claude Code to Alacritty

This commit is contained in:
David Heinemeier Hansson
2026-03-08 17:52:20 +01:00
parent ef93f6356c
commit be43e1193f
2 changed files with 9 additions and 1 deletions
+2 -1
View File
@@ -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" }
]
+7
View File
@@ -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