dbalatero / VimMode.spoon

Adds vim keybindings to all OS X inputs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Modals are Inputing twice per keypress

jmiller1750 opened this issue · comments

Hello,

I'm seeing an issue where motions defined in modal.lua are getting input twice. For example "w" moves forward by two words, "b" moves back by two words, and "x" deletes two characters.

On the other hand "d" does not execute "dd", but rather stops on the first input, which is to say it opens the delete modal. However, "dw" will delete the next word, and then move one additional word forward. "cw" works as expected.

I don't really know how to troubleshoot this so I'm hoping you may be able to assist.

Thank you!

@jmiller1750 What app does it occur in? What's the content of the text field, and where is the cursor positioned? I think I need those things to reproduce it.

It seems to happen ubiquitously in any non blacklisted app, wether in advanced mode or fallback mode. I tested in chrome, TextEdit, and slack. The text input can be anything, and it hasn’t functioned correctly so far for any combination of input, mode, or app. The cursor position doesn’t impact it either.

I’m trying to think if I have any other apps that aren’t playing nice. I use Karabiner and better touch tool, but disabling then didn’t make an impact either.

Let me know if I can provide any more information.

A few more pieces of info:

The double effect happens when I press a key down (I.e before it’s released).

It also happens with an external keyboard as well as the built in one.

I can see the first of the two movements execute very rapidly. For example if I have the text “[]This Text Here” and hit “w”, the cursor will jump to “This[]” and then immediately to “Text[]”, almost too fast to see.

Hmm interesting. I'm going to try to reproduce it on this end as well. Is it possible you're holding a key down or you have a high repeat rate, just to check some other things?

I'll try lowering the repeat rate; however I don't get similar behaviour outside of VimMode or in other contexts (i.e. dual input).

I have another data point for you. With repeat rate completely off, it still skips one word when hitting 'w'. However, holding down the key will actually make it continue moving by words slowly, but only one at a time as expected/desired. Similar behaviour with other functions. I would have expected that turning off the repeat rate would make it discontinue any additional actions after the first one.

Please let me know if these updates are becoming annoying; if they are I will stop. I've been enjoying trying to troubleshoot this and keep finding new info. Not that it's getting me anywhere really.

I created a new user account and installed the spoon, and found that it works as expected! This makes me believe that something is running under my normal user context that isn't interacting well, but I can't for the life of me figure out what it is.

It's no problem more context is great. I'm on vacation right now but I might catch some downtime at the family's to take a look at this soon!

I am experiencing this issue as well on a fresh install on Big Sur. I was able to work around it by disabling the event onRepeat event handler binding within ContextualModal, but I do lose some key repeat goodness. Even with key repeat complete disabled in the Keyboard Preference Pane, this repeat happens. For a bit more information, I do use a QMK-based Moonlander keyboard; not sure if this could be a cause of the issue, but seems worth knowing.

Ok cool, it sounds like there is some weird repeat thing happening for sure. Good idea messing with the onRepeat event handler though. I'll have to get a fresh config for this as well to repro it.