The Problem
I wanted to toggle NvimTree using Ctrl+Shift+E in Neovim (running inside WSL, through Windows Terminal).
It works in VSCode by default, but in Neovim, <C-S-e> didn't do anything.
What I Tried
- Ran
cat, pressedCtrl+Shift+E→ it outputs^[[1;6E - Ran
:echo getcharstr()in Neovim → got nothing.
→ Neovim drops unknown escape sequences from terminal. - Realized
Ctrl+Shift+Eisn't supported in terminfo/libtermkey.
→ Neovim never receives it.
The Hack
Added this keybinding in Windows Terminal settings.json:
{
"command": { "action": "sendInput", "input": "§" },
"keys": "ctrl+shift+e"
}
Then in Neovim:
vim.keymap.set("n", "§", "<cmd>NvimTreeToggle<CR>")
👉 Works! I can now toggle the file tree with Ctrl+Shift+E.
Note: I haven’t fully verified this behaviour in every environment, but in many terminal setups Neovim fails to recognise certain modified keys (e.g., Ctrl+Shift+E) because the escape sequence sent by the terminal isn’t defined in terminfo/libtermkey.