NStefan002 / screenkey.nvim

Screencast your keys in Neovim
MIT License
291 stars 5 forks source link

Duplicate keys shown with which-key.nvim #47

Open arielherself opened 4 weeks ago

arielherself commented 4 weeks ago

Problem

When I press operator + motion combination, screenkey shows duplicate characters like this:

Actually pressed Screenkey showing
gg g..x4
zz z..x4
vw v w w
viw v i w i w
zt z t z t

Steps to reproduce

  1. Install the plugin folke/which-key.nvim
  2. Activate :ScreenKey
  3. Press keys mentioned above
  4. Observe the content in screenkey window

Screenkey log output

No log shown.

Expected behavior

No response

Neovim version (nvim -v)

NVIM v0.10.1

Terminal name/version

tmux 3.4

NStefan002 commented 4 weeks ago

Hi, thanks for reporting. Unfortunately, I can't reproduce this behavior. Please provide a link to your config or a list of plugins you use, I don't know off the top of my head what could be causing this.

arielherself commented 3 weeks ago

Sorry for the late reply! After testing, I believe it's the plugin folke/which-key.nvim causing this issue.

NStefan002 commented 3 weeks ago

Thanks for the information. I don't use which-key, but I'll try to figure out why this happens when I have time.

arielherself commented 3 weeks ago

Thank you!

johe96 commented 3 weeks ago

Hi, just wanted to add that I'm having the same issue together with which-key. Pressing the keys mentioned (such as g, z and v) brings up the which-key popup that shows your vim keybinds.

(screenshot, I'm pressing g here): which-key_g-key_pressed

I haven't read the docs for it but the popup, whilst open, it does seem to duplicate your input regardless of the combination of keys pressed. i.e; instead of inputting g g to get to the first line of the file, typing a non-existing keybind like g G will also output g G g G on Screenkey. gGgG

Seems like it duplicates your inputs (or the last input) the instant you use a key that triggers the which-key popup to appear (which is any operator key that can be combined with a motion key).

NStefan002 commented 3 weeks ago

@johe96 thank you for the additional info.