Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeated keys during a keydown don't get sent #118

Closed
Julian opened this issue Sep 27, 2019 · 5 comments
Closed

Repeated keys during a keydown don't get sent #118

Julian opened this issue Sep 27, 2019 · 5 comments

Comments

@Julian
Copy link

Julian commented Sep 27, 2019

If I have a long multiline doc and hold down e.g. j in the embedded nvim, only the first j reaches the editor seemingly, and the cursor stays on the second line down rather than scrolling line-by-line.

Not sure if there's anything I can provide for diagnosis or if this can be reproduced by others.

@glacambre
Copy link
Owner

I can't reproduce this, keeping j pressed works for me. What OS+Browser+Neovim version are you using?

@Julian
Copy link
Author

Julian commented Sep 28, 2019

Hm, interesting.

Here, Firefox Quantum (69.0.1) on macOS Mojave (10.14.6) and nvim 0.4.2 from
Homebrew.

Separately, I have an issue where the embedded nvim doesn't show a cursor (of
any kind), so possibly the two issues are related and nvim is confused about
what terminal it's running in or something?

Let me know if there are other things I can poke at or provide obviously, and thanks again for the extension, well done.

@glacambre
Copy link
Owner

glacambre commented Sep 28, 2019

Could you save the following html file somewhere on your computer, open it in your browser and see if keeping j pressed works in all of the textareas?

<!doctype html>
<html lang="en">
        <head>
                <meta charset="utf-8">
                <meta name="viewport" content="">
                <title></title>
        </head>
        <body>
                <textarea id="textarea0"></textarea>
                <textarea id="textarea1"></textarea>
                <textarea id="textarea2"></textarea>
                <textarea id="textarea3"></textarea>
                <script>
                        document.getElementById("textarea1").addEventListener("input", e => {
                                e.preventDefault();
                                e.stopImmediatePropagation();
                                e.target.value += "a";
                        });
                        document.getElementById("textarea2").addEventListener("input", e => {
                                e.preventDefault();
                                e.target.value += "a";
                        });
                        document.getElementById("textarea3").addEventListener("input", e => {
                                e.stopImmediatePropagation();
                                e.target.value += "a";
                        });
                </script>
        </body>
</html>

I don't think your cursor issue is related. I believe I remember experiencing something similar before but I have no idea how/why it disappeared.

@Julian
Copy link
Author

Julian commented Sep 28, 2019

It doesn't, in any of them...

Which was enough to remind me what the issue was.

It's the Apple accent key nonsense (which doesn't trigger on j, but if you
have it enabled at least prevents j from sending key repeats).

If I'd have tried 'e' I'd have known why immediately.

For anyone finding this, https://ioshacker.com/how-to/disable-macos-accent-keys-and-enable-key-repeat is how you'd fix it.

Though there must be some per-App-ness to it because key repeat has always
worked in terminal nvim, so maybe there's a way to disable it here too by
default even on macOS machines that otherwise have it enabled...

But yeah will close for now, thanks for the hint!

@Julian Julian closed this as completed Sep 28, 2019
@glacambre
Copy link
Owner

Sounds like a nice feature to train yourself to use 3j instead of jjj 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants