diff options
| author | Igor Soarez <igor@soarez.org> | 2026-10-05 18:46:10 +0300 |
|---|---|---|
| committer | Igor Soarez <igor@soarez.org> | 2026-10-05 18:46:10 +0300 |
| commit | 6c97cb32cb21beb265a3d5b2b72a92aed52f9040 (patch) | |
| tree | dca3ed14260b2cc3d0d1a90105b342255b38c4b3 /config/zshrc | |
| parent | 6a6c5821a0f368a53548f36a0bd63b035b8e1344 (diff) | |
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.
Diffstat (limited to 'config/zshrc')
| -rwxr-xr-x | config/zshrc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/config/zshrc b/config/zshrc index 0b22223..599c69b 100755 --- a/config/zshrc +++ b/config/zshrc @@ -33,6 +33,12 @@ unset _fp 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*/`). |
