From 6c97cb32cb21beb265a3d5b2b72a92aed52f9040 Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Mon, 5 Oct 2026 18:46:10 +0300 Subject: 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. --- config/zshrc | 6 ++++++ 1 file changed, 6 insertions(+) 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*/`). -- cgit v1.2.3