Skip to content

Alacritty setup writes invalid TOML escape \x1b instead of \u001b #25411

@TheHalfrican

Description

@TheHalfrican

Bug

When Claude Code sets up the Shift+Enter keybinding in Alacritty's alacritty.toml, it writes:

[[keyboard.bindings]]
key = "Return"
mods = "Shift"
chars = "\x1b\r"

\x is not a valid TOML escape sequence (TOML spec), which causes a parse error at the chars line and prevents Alacritty from loading the config entirely.

Expected behavior

The installer should use the TOML-compatible Unicode escape \u001b:

chars = "\u001b\r"

Reproduction

  1. Have an existing alacritty.toml config
  2. Install Claude Code and add it to PATH
  3. Alacritty fails to load with a parse error on the chars line

Environment

  • OS: Windows 11 Pro (25H2)
  • Alacritty: 0.16.1
  • Config path: %APPDATA%\alacritty\alacritty.toml

Notes

  • The setup correctly creates a .bak backup before modifying the file
  • Reinstalling/updating Claude Code re-applies the broken escape, overwriting manual fixes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already existsplatform:windowsIssue specifically occurs on Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions