fix(wezterm): prevent Herdr from swallowing Escape#15
Merged
Conversation
Herdr holds a lone Escape ~150ms and coalesces it with a tailgating SGR mouse event, then drops the pair - swallowing Escape in editors like Neovim. Enabling the kitty keyboard protocol makes WezTerm emit Escape as an atomic key event (\x1b[27u), so Herdr never enters the hold/fold path.
kunchenguid
added a commit
that referenced
this pull request
Jul 11, 2026
The enable_kitty_keyboard option added in PR #15 caused a total-loss regression: physical Escape never registered in Neovim under Herdr after a rebuild. Remove the option and its README explainer so viewers who follow this setup are not broken.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Fix the confirmed Herdr Escape-swallow bug for viewers who follow this public dotfiles setup. Inside Herdr, a lone Escape is held ~150ms and coalesces with a tailgating SGR mouse event which Herdr drops, swallowing Escape in editors like Neovim. The clean, minimal fix is to enable the kitty keyboard protocol in this repo's tracked WezTerm config so WezTerm emits Escape as an atomic key event (\x1b[27u), and Herdr never enters the hold/fold path.
Scope: add exactly one config option, config.enable_kitty_keyboard = true (matching WezTerm's Lua API), to home/.config/wezterm/wezterm.lua, plus one concise comment explaining it makes Esc atomic so Herdr does not swallow it. Purely additive; nothing else changed. Placed at the end of the config block before 'return config', matching the file's existing 'config.xxx = value' style.
This is a PUBLIC on-camera teaching repo. Intentional constraints a reviewer should not flag: the change is deliberately minimal (single option + comment); no root AGENTS.md/CLAUDE.md agent-scaffolding should be added to this repo (project knowledge for viewers lives in the README); .no-mistakes/ stays untracked and must not be committed.
What Changed
Risk Assessment
✅ Low: The change is narrowly scoped, uses the documented WezTerm option correctly, and introduces no material correctness, compatibility, security, or maintainability concerns.
Testing
Inspected the complete baseline-to-target diff, loaded the tracked configuration with installed WezTerm 20240203, and captured evidence that the intended option is accepted. The change passed; direct Escape-byte capture was not feasible without an interactive Herdr terminal session.
Evidence: WezTerm configuration verification transcript
wezterm 20240203-110809-5046fc22 config file: home/.config/wezterm/wezterm.lua resolved option source: 15:config.enable_kitty_keyboard = true config load: wezterm show-keys completed successfully changed paths and line counts: 4 0 home/.config/wezterm/wezterm.luaPipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
git diff --no-ext-diff ad6fe1d9f43dfbf96d577b619fb8d5d99ce3174b b2115553b829bb3023e1d256f222798cff93f30f -- home/.config/wezterm/wezterm.luawezterm --config-file home/.config/wezterm/wezterm.lua show-keysrg -n '^config\.enable_kitty_keyboard = true$' home/.config/wezterm/wezterm.luagit diff --numstat ad6fe1d9f43dfbf96d577b619fb8d5d99ce3174b b2115553b829bb3023e1d256f222798cff93f30f✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.