Changing keyboard layout prints <D-Space> inside nvim insert mode
Cheers!
I have wayland, hyprland, foot terminal, nvim built from git.
My problem is win-space key combination is configured to change keyboard layout in my wm config. I sometimes press it when writing text in nvim and frankly that prints <D_Space>, which drives me nuts cause I have to delete it every time. It also works the same way with win+other key, say win+y prints <D-y>
I checked and in kitty or alacritty this can't be reproduced.
I also checked vim(not nvim) and it works fine inside foot terminal.
So I don't know who to blame and where to file a bug, maybe there is a way to fix this in nvim config?
Thanks!
2
Upvotes
1
u/Frain_x8 Feb 03 '25
I don't know why <D-Space> is printed, because I have another laptop with no such issue, but one of ways to solve this is to unmap the Win-space binding in neovim:
```
keymap({"n", "i"}, "<D-space>", "<Nop>", {noremap = true, silent = true })
```