Karl SvenssonBlogLinkedIn

Enabling repeating character when keeping key pressed in VS Code on macos

Written 2024-04-17 by Kalle
1 min read | 76 words

In VS Code on Windows, keeping a key pressed will result in repeated keystrokes until the key is released. On macOS, however, this i not the case; only a single keystroke is emitted on each button down. This is annoying when using vim mode since hjkl are used to navigate.

To enable repeated keystrokes, execute the following in Terminal:

defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false

To disable, execute the following:

defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool true

© 2024