vhakulinen / gnvim

GUI for neovim, without any web bloat
MIT License
1.84k stars 69 forks source link

Added keyname translation for space key #176

Closed nikplx closed 2 years ago

nikplx commented 3 years ago

As brought up in https://github.com/vhakulinen/gnvim/issues/164 keymappings onto <C-Space> do not work when using gnvim. As this is a nice thing to have especially for toggeling something like gitgutter with an super accessible key like Space I went into the code an saw that the keyname_to_nvim_key function in ui.rs did not contain a mapping for the "space" keyname. I added this one in and for the testcase described below it works like a charm.

Minimal setup for testing:

$ cargo run -- -- -u NONE
:nnoremap <C-Space> :vsplit<cr>
<C-Space>