diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/nvim/init.lua | 13 | ||||
| -rw-r--r-- | config/tmux.conf | 6 |
2 files changed, 19 insertions, 0 deletions
diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 3f094e8..89ab1b8 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -242,6 +242,19 @@ if not vim.g.lazy_bootstrapped then 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 ---------------------------------------- ------------------------------------------------------ diff --git a/config/tmux.conf b/config/tmux.conf index 913a968..ceb59e6 100644 --- a/config/tmux.conf +++ b/config/tmux.conf @@ -155,6 +155,12 @@ set -g allow-passthrough on # 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, |
