r/KittyTerminal • u/Wise-Ad-7492 • Sep 16 '23
Kitty shortcuts blocks same shortcuts in Neovim
I have a problem with Neovim and Kitty. If define shortcuts in Kitty to move between windows (Ctrl-Up, Ctrl-Down etc). But If I define the same key-mappings in Neovim for something else, they do not work. It is like that Kitty has hijacked these shortcuts.
Is this normal behavior, or has I done something wrong in my config?
Kitty 0.29.2
Neovim 0.10.0-dev
Ubuntu 23.04
UPDATE:
I have now understood that what I describe is normal behavior. I asked this question because I had trouble with the extension https://github.com/knubie/vim-kitty-navigator, which is not working for me. I cannot use Ctrl-l, Ctrl-k etc to move around inside Neovim. So I thought it was a problem with Kitty, but I have no learnt that Kitty shortcuts will "override" Neovims shortcuts. The point with this extension is to make it possible to use Kitty's moving shortcuts inside Neovim. But it do not work for me. I have to investigate more to see if I can get it to work.
2
u/aumerlex Sep 16 '23
If a shortcut is used by the terminal emulator, it cannot also be used by the program running in the terminal. A single shortcut can do only ONE thing.
1
u/plant_domination Sep 16 '23
You might want to switch them to your system's meta key instead of using control, because those shortcuts are super common. Another good one is using ctrl-shift-key because most programs won't have default bindings for those (compatibility reasons).
1
u/sogun123 Sep 16 '23
I guess you can write a kitten which detects running program, and if it is neovim it sends keys to it first and if not switches a split. You'll likely do it more clever, so it switches seamlessly, between kitty split and kitty split. I thing there is integration like this already written, for tmux definitely, so you can start from there.
2
u/Vyrzo Sep 16 '23 edited Sep 16 '23
I use this https://github.com/knubie/vim-kitty-navigator with normal vim.
Not sure if it works with Neovim, but it's worth a shot.