tamton-aquib / keys.nvim

A screen keys plugin for neovim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

does not correctly capture control characters

matu3ba opened this issue · comments

Heyyo @matu3ba , (3 eternities later)
The recent PR #2 might fix this issue, fyi

Hey @tamton-aquib, I adjusted the issue. It mostly just works, but looks sometimes very confusing to me.

  1. Hitting C-c in normal mode creates two times C-c instead of the expected one.
  2. And I dont think having insert->normal with C-c should show a different symbol than regular C-c, but thats more of a personal preference for consistency.
  3. Neither do I understand, why A from normal mode shows up A <Cmd>. I would have expected it showing up Ins, if the intention is to show the new mode.

Great description, I'll start working on this next week 👍🏻

So Im just back from holidays and was looking at the issue, and i have no idea why <C-c> shows twice.
But every mapped control keys shows their original values so <C-c> might be an internal mapping.

Regarding the <Cmd> thing, I am ignoring that part in the code. So now it shouldn't show anything when we enter insert mode.

commented
vim.keymap.set({'i','n'},'<C-c>','<C-c>')

This fixes the insert double ctrl-c bug.

So hey @matu3ba,

Is this issue good to be closed?

@tamton-aquib Thanks for asking. I do conisder this issue as closed since most control characters just work and some should be quirky to handle with how vim/neovim handles key input.

I managed to break the plugin in a weird way, but I believe that was due to updating leading to some weird cache effects.