Skip to content

keymap: add an Alt+Shift+letter branch to the key parser #554

Description

@fentas

Follow-up from the PR #552 review.

Kitty reports a letter key by its unshifted codepoint plus a shift modifier bit. keymap/parser.zig already encodes that rule for Ctrl+Shift+<letter> (it lowercases), and the LLM module's bindings follow it. But the parser has no Alt+Shift+<letter> branch, so defaults.zig hand-rolls the raw CSI-u literals — and got two of them wrong (68;4u for 'D', 87;4u for 'W' instead of 100;4u/119;4u), which made Alt+Shift+D and Alt+Shift+W inert on Ghostty/kitty/foot/WezTerm.

PR #552 fixes the two literals and adds e2e coverage, but the underlying drift remains: the rule lives in prose in defaults.zig instead of in the parser. Adding an Alt+Shift+<letter> branch to keymap.key() would let those bindings be written as atty.keymap.key("Alt+Shift+D") and make a future wrong literal impossible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions