Disabling the character-modifier popup on macOS

IT · September 3, 2026

This page gives the commands necessary to disable the diacritical popup menu on a keyboard long-press on Mac OSX machines. These popups typically allow you to add accents and umlauts to vowels, but it interferes with Vim.

These commands are generally taken from this Stack Overflow post.

My setup:

defaults delete -g ApplePressAndHoldEnabled \
; defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false \
; defaults write com.apple.Terminal   ApplePressAndHoldEnabled -bool false \
; defaults write com.apple.dt.Xcode   ApplePressAndHoldEnabled -bool false

To disable this per application, replace $ID with the name of the application:

default write $ID ApplePressAndHoldEnabled -bool false

To disable this globally:

defaults write -g ApplePressAndHoldEnabled -bool false

To see a list of application/organization names on your machine, run:

defaults domains | tr ',' '\n' | sed 's/^[ \t]*//' | sort