Find App Identifier for ‘defaults’ Command on macOS

command linecustomizationmacossettings

I would like to disable hold and press for Hyper Terminal. I have already successfully done so for VS Code using the following recipe:

defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false

from https://stackoverflow.com/a/44010683/7483211

My problem is that I don't know the app identifier I need to put in instead of com.microsoft.VSCode.

How do I find this out for an app?

Best Answer

It's actually not called an "app identifier" (that's something slightly different) - the correct name is "bundle identifier".

You can find it by looking in the Info.plist file in the Contents folder of any macOS application. For example for Visual Studio Code, it would typically be located in:

/Applications/Visual Studio Code.app/Contents/Info.plist

You need to look for the key named CFBundleIdentifier - it will look something like this:

<key>CFBundleIdentifier</key>
<string>com.microsoft.VSCode</string>