Skip to content

Instantly share code, notes, and snippets.

@lsd
Last active December 12, 2023 18:09
Show Gist options
  • Save lsd/1e1826907ab7e49c536a to your computer and use it in GitHub Desktop.
Save lsd/1e1826907ab7e49c536a to your computer and use it in GitHub Desktop.
Enable key-repeat for ALL applications or just for IdeaVim/specific JetBrains apps

Upgrading to Lion or Yosemite and WebStorm 9, I noticed key repeat was
turned off for the IdeaVim plugin h j k l keys.

System-wide key repeat

defaults write -g ApplePressAndHoldEnabled -bool false in a terminal will enable
key repeat for every app. This can alternatively be found in the accessibility settings in OS X' preferences.

App specific key repeat

If you only want this behavior for specific JetBrains' apps, use:

  • Community Edition IntelliJ: - defaults write com.jetbrains.intellij.ce ApplePressAndHoldEnabled -bool false
  • Ultimate Edition IntelliJ: defaults write com.jetbrains.intellij ApplePressAndHoldEnabled -bool false
  • AppCode: defaults write com.jetbrains.AppCode ApplePressAndHoldEnabled -bool false
  • PyCharm: defaults write com.jetbrains.PyCharm ApplePressAndHoldEnabled -bool false
  • Android Studio: defaults write com.google.android.studio ApplePressAndHoldEnabled -bool false
  • WebStorm: defaults write com.jetbrains.WebStorm ApplePressAndHoldEnabled -bool false *
  • RubyMine: defaults write com.jetbrains.RubyMine ApplePressAndHoldEnabled -bool false *

** * These are assumptions, use Spotlight com.jetbrains. to get type hinting for your specific app**

@jmoody
Copy link

jmoody commented Jun 17, 2015

defaults write com.jetbrains.RubyMine ApplePressAndHoldEnabled -bool false

This erased all my ~/Library/Preferences/RubyMine70 settings. I did, however, take heed and made a backup of my settings before running this command.

@purple4reina
Copy link

defaults write com.jetbrains.pycharm ApplePressAndHoldEnabled -bool false worked for me

@fatso83
Copy link

fatso83 commented Aug 27, 2015

Good guess, defaults write com.jetbrains.WebStorm ApplePressAndHoldEnabled -bool false was indeed the trick that enabled repeating keys in WebStorm.

@brki
Copy link

brki commented Sep 14, 2015

The domain name is case insensitive (e.g. com.jetbrains.pycharm is the same as com.jetbrains.PyCharm).

However, disabling it for just PyCharm doesn't work for me ... using PyCharm 4.5 Professional edition, and OS X 10.10.5. I have to disable it globally, which is a bummer, because I do often need to type accented characters in other applications (and never remember how to do an è character without the popup).

@ethanp
Copy link

ethanp commented Sep 23, 2015

Had to restart IntelliJ afterwards

@iammattcoleman
Copy link

CLion: defaults write com.jetbrains.CLion ApplePressAndHoldEnabled -bool false
PhpStorm: defaults write com.jetbrains.PhpStorm ApplePressAndHoldEnabled -bool false

@marqueymarc
Copy link

for webstorm, defaults write com.jetbrains.WebStorm ApplePressAndHoldEnabled -bool false worked for me!

@fawazlab
Copy link

fawazlab commented Feb 7, 2017

Thank you!

@itsjorgebar
Copy link

Reboot computer after running the command

@michaelkruglos
Copy link

What would it be for Rider?

@richtera
Copy link

It says this is also available in system settings / accessibility but what is it called there?

@citizenmatt
Copy link

Rider is com.jetbrains.rider. For EAP builds, it's com.jetbrains.rider-EAP

@songzhm
Copy link

songzhm commented May 11, 2018

Tried defaults write com.jetbrains.PyCharm ApplePressAndHoldEnabled -bool false first --didn't work for me
Tried defaults write com.jetbrains.pycharm ApplePressAndHoldEnabled -bool false then as suggested by @purple4reina -- worked!

I'm using MacOS High Sierra

@sarndt
Copy link

sarndt commented May 31, 2018

Has anyone an idea how to do this for the toolbox installed versions? They seem to have the same key in the plist, but it didn't work for me using these commands

@chrisdembia
Copy link

Yes, does anyone know how to get this to work for toolbox versions?

@alexventuraio
Copy link

Tried defaults write com.jetbrains.RubyMine ApplePressAndHoldEnabled -bool false and worked like a charm.
I'm using MacOS Mojave version 10.14.1

@hoangbits
Copy link

defaults write -g ApplePressAndHoldEnabled 0
same as
defaults write -g ApplePressAndHoldEnabled -bool false

@roaming-debug
Copy link

Thanks!

@nickwdm
Copy link

nickwdm commented Jan 8, 2021

You saved my life man! I was having issues with Webstorm on Big Sur.

@anyu
Copy link

anyu commented May 24, 2021

Thanks! Worked for Goland.

defaults write com.jetbrains.goland ApplePressAndHoldEnabled -bool false

@CoderJava
Copy link

Thanks. It worked to me in Android Studio.

@mondongxr
Copy link

mondongxr commented Jun 17, 2021

Nice, It worked for me in Android Studio. Thank you~

@danielsepulvedab
Copy link

I had accepted by mistake PyCharm's suggestion to create the global setting. Then I reversed it with defaults write -g ApplePressAndHoldEnabled -bool true. After that the commands for the individuals apps were not working, even though I had set them properly. After I removed the entry they started to work: defaults delete -g ApplePressAndHoldEnabled
This was on the Toolbox version of the apps.

@Climax777
Copy link

defaults delete -g ApplePressAndHoldEnabled

This worked for me too in combination with the above instructions

@orlando
Copy link

orlando commented Nov 1, 2021

I had accepted by mistake PyCharm's suggestion to create the global setting. Then I reversed it with defaults write -g ApplePressAndHoldEnabled -bool true. After that the commands for the individuals apps were not working, even though I had set them properly. After I removed the entry they started to work: defaults delete -g ApplePressAndHoldEnabled This was on the Toolbox version of the apps.

This is what I had to do to get it working 👍

@eduardo4jesus
Copy link

https://i.ibb.co/r6qbHKs/Screen-Shot-2022-04-18-at-2-25-38-PM.png

I wish I had taken this screenshot before pressing the wrong option here. I spent quite sometime trying to reset the options so this window would appear again. I tried a few of the solutions above and didn't work.

@jaimb1
Copy link

jaimb1 commented Jun 24, 2022

In case anyone else is having trouble getting this working for PyCharm installed through Jetbrains Toolbox, I first did a search with defaults find pycharm and found it's named similar to intellij in the original post. This command worked for me: defaults write com.jetbrains.pycharm.ce ApplePressAndHoldEnabled -bool false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment