VSCode on Mac Long Press Keys Not Repeating

Enable your key repeat in vscode on mac in the terminal

Solution

In some versions of vscode on Mac, when we long press a key, it does not repeat.

To ENABLE REPEAT on Mac1:

defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false

Reason

Apple has this ApplePressAndHold function, where we can long press a key to type alternative characters. This is very useful in many cases, e.g., typing öü on a English keyboard. This is enabled by default on Mac.

We can disable it for some certain applications to enable repeating. The above solution will disable it for vscode.

There are examples for other applications too. For example, to disable it for sublime, we can follow this gist: https://gist.github.com/leesmith/8029019

Planted: by ;

L Ma (2018). 'VSCode on Mac Long Press Keys Not Repeating', Datumorphism, 12 April. Available at: https://datumorphism.leima.is/til/misc/vscode/vscode-on-mac-do-not-repeat/.