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

Holding keys for movement doesn't repeat #14

Open
luishasmail opened this issue Oct 14, 2018 · 4 comments
Open

Holding keys for movement doesn't repeat #14

luishasmail opened this issue Oct 14, 2018 · 4 comments

Comments

@luishasmail
Copy link

When using VIM in a terminal, I'm pretty used to being able to navigate by holding a key. For example:

In terminal:
hold j -> cursor moves down one line until I release the key

In VSCode:
hold j -> cursor moves down one and only one line per keydown

Would it be possible to emulate the behavior of the terminal? I'm quite used to navigating by holding these keys.

Thank you for your time and this awesome extension!

@jpotterm
Copy link
Owner

I'm glad you've found the extension useful! I'm not able to reproduce what you described though. When I hold down j the cursor keeps moving down until I release it. Maybe the problem is elsewhere? If you go into insert mode and then hold down j does it repeat?

@jpotterm
Copy link
Owner

Also, what operating system are you on?

@luishasmail
Copy link
Author

I tried this out on a clean install of VSCode (1.28.1) on macOS Mojave. If I go to insert mode and hold down j it does not repeat.

However, your question about the operating system got me thinking:

  • I noticed that macOS does not repeat keys when you hold them down by default
  • I did a little googling and found this command, which enables this behavior:
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false

After running this command things work as expected and I now get a key repeat when I hold a key down in insert mode. Perhaps this is something to add to the documentation or perhaps even write a workaround for since this isn't a default on macOS? Either way, I'd be happy to help and this does fix the issue for me. Thank you for the rapid response!

@jpotterm
Copy link
Owner

jpotterm commented Oct 16, 2018

I suspected that might be your problem. Glad you got it resolved! It's impossible to workaround: since it's at the operating system level VSCode doesn't even get notified of the key events, let alone this extension. I'll consider adding it to the documentation for this extension. At the very least, this issue can serve as some form of documentation.

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