zsh: Caps Lock no longer types junk at a prompt without tmux Caps Lock sends F20, which a terminal with no tmux in front of zsh passes on as ESC[34~ (Alacritty 0.17.0, input/keyboard.rs). Nothing bound it, so zsh split the sequence and typed what was left at the prompt, once per repeat. Bound as a whole to nothing, it is consumed as one key; replayed over a pty, three presses typed 4~4~4~ before and nothing after. The zsh half of the fix for Neovim and tmux. From change request 47bf8a.
Igor Soarez igor@soarez.org
Mon, 05 Oct 2026 18:46:10 +0300
1 files changed,
6 insertions(+),
0 deletions(-)
jump to
M
config/zshrc
→
config/zshrc
@@ -33,6 +33,12 @@ # fix delete
bindkey "^[[3~" delete-char bindkey "^[3;5~" delete-char +# Caps Lock is F20 (hammerspoon). A terminal with no tmux in front of zsh, like +# Alacritty, sends it as ESC[34~. Nothing binds that, so zsh split it and left a +# `~` at the prompt for every key repeat. Binding the whole sequence to nothing +# makes zsh consume it as one key. Wispr Flow reads the key itself. +bindkey -s '^[[34~' '' + # chpwd() { ls -A; } # Auto ls after changing directory. CDPATH=~ # Check ~ for directories after checking . (`c/d/` matches `./c*/d*/`, then tries `~/c*/d*/`).