From 4d15fbfd2197fabbe0baa43c587c03211426cae8 Mon Sep 17 00:00:00 2001 From: Gabriel Martins Date: Wed, 14 May 2025 20:43:35 -0300 Subject: [PATCH 1/2] Restructure mac key-repeating help section in README and add command for Cursor. Fixes #9500 --- README.md | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7832a5825a7..984d366e057 100644 --- a/README.md +++ b/README.md @@ -57,14 +57,42 @@ VSCodeVim can be installed via the VS Code [Marketplace](https://marketplace.vis ### Mac -To enable key-repeating, execute the following in your Terminal, log out and back in, and then restart VS Code: +To enable key-repeating, execute one of the following commands in your Terminal depending on the application you are using, log out and back in, and then restart VS Code: + +#### VS Code + +```sh +defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false +``` + +#### VS Code Insider + +```sh +defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false +``` + +#### VS Codium + +```sh +defaults write com.vscodium ApplePressAndHoldEnabled -bool false +``` + +#### VS Codium Exploration + +```sh +defaults write com.microsoft.VSCodeExploration ApplePressAndHoldEnabled -bool false +``` + +#### Cursor + +```sh +defaults write "$(osascript -e 'id of app "Cursor"')" ApplePressAndHoldEnabled -bool false +``` + +#### If necessary, reset global default ```sh -defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false # For VS Code -defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false # For VS Code Insider -defaults write com.vscodium ApplePressAndHoldEnabled -bool false # For VS Codium -defaults write com.microsoft.VSCodeExploration ApplePressAndHoldEnabled -bool false # For VS Codium Exploration users -defaults delete -g ApplePressAndHoldEnabled # If necessary, reset global default +defaults delete -g ApplePressAndHoldEnabled ``` We also recommend increasing Key Repeat and Delay Until Repeat settings in _System Preferences -> Keyboard_. From 98ec294a5e75bf401b510273d338082ef9c5cda1 Mon Sep 17 00:00:00 2001 From: Gabriel Martins Date: Mon, 19 May 2025 20:58:30 -0300 Subject: [PATCH 2/2] Use the -app parameter for the Cursor app and the domain as a possible fallback --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 984d366e057..a275e673c75 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,12 @@ defaults write com.microsoft.VSCodeExploration ApplePressAndHoldEnabled -bool fa #### Cursor +```sh +defaults write -app Cursor ApplePressAndHoldEnabled -bool false +``` + +If that does not work for Cursor, try using the domain of the app: + ```sh defaults write "$(osascript -e 'id of app "Cursor"')" ApplePressAndHoldEnabled -bool false ```