all repos — dot @ 09fd7f0294f975f53f72bc3551099f968341419e

Shell, editor and terminal configuration, and the tools that go with them

Caps Lock no longer types <F22> into Neovim

Caps Lock sends F20, and the terminal passes it on as well as Wispr Flow
seeing it. tmux reads it as S-F10 and hands the pane ESC[21;2~, which Neovim
decodes as <F22> and, with nothing mapped to it, types out as text -- once per
repeat while the key is held.

Dropped in both places, each enough alone: Neovim maps <F20> and <F22> to
nothing, terminal mode included so a :terminal does not pass it to its shell,
and tmux binds S-F10 to an empty command, which also swallows a real
Shift+F10 that nothing here uses. The empty binding loads on tmux 3.5a and 3.4.

From change request cee596.
Igor Soarez igor@soarez.org
Mon, 05 Oct 2026 16:20:06 +0300
commit

09fd7f0294f975f53f72bc3551099f968341419e

parent

611dfd90d4e523984a78728ebfee033e4c16b37d

2 files changed, 19 insertions(+), 0 deletions(-)

jump to
M config/nvim/init.lua → config/nvim/init.lua

@@ -242,6 +242,19 @@ require("config.lazy")

end ------------------------------------------------------ +---- Caps Lock key ----------------------------------- +------------------------------------------------------ + +-- Caps Lock sends F20 (hammerspoon), which reaches Neovim as F22 through tmux. +-- Neovim types the name of a function key nothing maps, so holding it filled +-- the buffer with <F22>. Wispr Flow reads the key before the terminal does, so +-- nothing is lost by dropping it here. Terminal mode too, or holding it in a +-- :terminal would send the key on to the shell running there. +for _, key in ipairs({ "<F20>", "<F22>" }) do + vim.keymap.set({ "n", "x", "s", "o", "i", "c", "t" }, key, "<Nop>") +end + +------------------------------------------------------ ---- Terminal ---------------------------------------- ------------------------------------------------------
M config/tmux.conf → config/tmux.conf

@@ -155,6 +155,12 @@ # conflicts with paste operations (causes escape sequences like ^[[27;5;106~ to appear)

# See: https://github.com/ghostty-org/ghostty/issues/7997 set -g extended-keys off +# Caps Lock is F20 (hammerspoon). What reaches tmux for it is read as S-F10 and +# passed on as ESC[21;2~, which Neovim takes for F22 and types out as text. Wispr +# Flow reads the key before the terminal does, so nothing here needs it: drop it. +# This also drops a real Shift+F10. +bind-key -n S-F10 {} + # Machine-local overrides, where a machine has any: ~/.tmux.conf.local, a real # file in no repo, like ~/.localprofile for the shell. Not under ~/.config/tmux, # which is a link into this repo. Last, so it wins over everything above,