[BUG] Installation corrupts alacritty.toml when `keyboard.bindings` is already defined as an inline array
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code installation appends a keybinding to ~/.config/alacritty/alacritty.toml using the TOML array of tables syntax ([[keyboard.bindings]]). If the config file already defines keyboard.bindings as an inline array, TOML considers this a duplicate key and refuses to parse the file. As a result, Alacritty fails to start after installing Claude Code.
The installer added:
[[keyboard.bindings]]
key = "Return"
mods = "Shift"
chars = "\^[\r"
But the existing config already had:
[keyboard]
bindings = [
{ key = "M", mods = "Control", action = "None" },
{ key = "Y", mods = "Control", action = "None" },
]
These two syntaxes are incompatible in TOML — mixing an inline array with [[...]] array-of-tables for the same key is not allowed.
What Should Happen?
The installer should detect the existing keyboard.bindings definition and merge the new binding into it, rather than blindly appending a [[keyboard.bindings]] block. The result should look like:
[keyboard]
bindings = [
{ key = "M", mods = "Control", action = "None" },
{ key = "Y", mods = "Control", action = "None" },
{ key = "Return", mods = "Shift", chars = "\^[\r" },
]
Error Messages/Logs
[ERROR] Unable to load config "/home/user/.config/alacritty/alacritty.toml": Config error: TOML parse error at line 115, column 1
|
115 | [[keyboard.bindings]]
| ^
invalid table header
duplicate key `bindings` in table `keyboard`
See log at /tmp/Alacritty-35421.log ($ALACRITTY_LOG)
Steps to Reproduce
- Have an existing
~/.config/alacritty/alacritty.tomlwith a[keyboard]section using inline array syntax forbindings - Install Claude Code
- Open Alacritty — it fails with the duplicate key error above
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.80 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗