Send Ctrl+<n> through to Neovim in foot terminal with tmux
Hi, looking for some help. I really want to be able to use bindings like C-1, C-2, ... in Neovim. However, I am aware that with many terminals C-1 sends 1, C-2 sends C-@, and so on.
With just Neovim and foot terminal, it works with no additional configuration - hitting C-1 activates my C-1 binding in Neovim. However, when running tmux, it doesn't work.
I believe the solution will lie in some combination of the following lines in my config
set -ga terminal-features 'foot*:extkeys'
set -g extended-keys-format csi-u
set -g extended-keys always
set -g xterm-keys on
set -g allow-passthrough on
The only thing that makes a clear difference is extended-keys always which for some reason makes C-1 work as desired but no change in behaviour for C-2, C-3, C-4 (still sending C-@ etc... however, C-1 now sends ^[[49;5u ... I will not pretend to know what this means, I am not a terminal expert)
I'll be honest and say these are just lines I've picked up from stackoverflow posts and github issues that seem related. I have also seen there is something called the kitty key protocol that might lead to a solution.
Any help is welcome. I love working in the terminal but god damn the layers of tech debt, abstraction, protocols and so on make this seemingly simple thing so complicated.
Tmux 3.5, by the way.
Posted Oct 30, 2025, 9:31 PM UTC