Closed sakhnik closed 1 year ago
Didn't even knew about keymap
or i_ctrl-^
but it seems to be working just fine for me.
If you run gnvim
from terminal, do you see something along these lines once you press the last key on the key combination?
Failed to turn input event into nvim key (keyval: 65506)
For me, to complete ctrl-^
, I need to process ctrl+shift+¨
where the last key is second row from the top, next to enter key (finnish/scandinavian keyboard). I first get the Failed to turn input event....
message for ctrl and shift but once I press the last key, gnvim manages to turn the input into something that it can send to nvim.
Right, there's a message:
Failed to turn input event into nvim key (keyval: 65505)
Received unknown redraw event: msg_showmode
Unfortunately, I wasn't able to figure out a workaround.
Keyval 65505 is left shift for me. If you just press just left shift, will it give you the same message? The second line is irrelevant to this problem.
Oh, I'm sorry. That's the left shift. And nothing is printed for i_ctrl-^
.
Have you tried with an empty init.vim
? Using -u NONE
will make gnvim unable to load its runtime files (which are required), so empty init file is required instead.
Yes, I did. Still no luck.
Just to make sure, did you run gnvim -- -u <empty.vim file>
? Also, are you able to just type ^
in insert mode?
Affirmative to both questions.
I enabled ukrainian keyboard layout on my machine, and after setting :set keymap=ukrainian-jcuken
I was not able to type ^
in insert mode (same as you) while I was able to do so without setting the keymap
. I tried the same with TUI nvim (gnome-terminal) and got the exact opposite results (everything worked as expected with ukrainian layout but not with finnish layout).
This certainly is weird.
Similar issue with the US Layout (intl., with AltGr dead keys).
Every time I press the shift key it prints Failed to turn input event into nvim key (keyval: 65506)
into my terminal which in turn spams neovim with "No matching autocommands". I think that's because it I need it for the colon key opens the command line prompt?
When I press the ctrl key it prints Failed to turn input event into nvim key (keyval: 65507)
. To confirm this behavior I completely removed every piece of neovim config I wrote and ran the same test with neovim inside Alacritty, xfce4-terminal, nvim-qt and neovim-gtk. None of those show this behavior.
For some reason it get worse when I use addons like startify or coc. In that case my neovim message line just gets spammed with "No matching autocommands" which makes it useless.
The "No matching autocommands" message is unrelated to this problem, and should be fixed in 4b248cd. Failed to turn input event into nvim key...
messages are mostly for debugging purposes. Shift and ctrl keys aren't send as is to nvim (they dont do anything in TUI, do they?). Once you combine them with another key, the key combination is sent to nvim (for example, <c-r>
).
I'm having the same issue with the normal mode Ctrl-^ / Ctrl-6 binding. It just inputs the number 6 (as if it was the repeat count I was inputting).
Gnvim was rewritten from ground up for gtk4. If the problem persists, feel free to reopen this issue.
The
i_ctrl-^
does't switch keymaps.Actual: 6 is printed Expected: default keymap is activated