24

How to disable those shortcuts using some CLI command/tool:

  • "Open man Page in Terminal" - Cmd+Shift+A
  • "Search man Page Index in Terminal" - Cmd+Shift+A

Both are located in System Preferences > Keyboard > Shortcuts > Services as shown in the picture:

'Services' shortcuts

I've managed before to enable/disable some of the 'Mission Control' and 'Spotlight' shortcuts by editing ~/Library/Preferences/com.apple.symbolichotkeys.plist" (link), but it looks they are defined somewhere else.

Is there any other plist, db, config file, CLI tool or API to modify these?

2
  • 2
    For people doing this from the UI, these commands are in a "Text" submenu in Ventura.
    – Noumenon
    Feb 27 at 12:23
  • So... quite embarrassing, but I started to update the question to match macOS Ventura layout, but only then realized that this is not an answer. I was googling for any way to disable those shortcuts. I still posted the update, but maybe we should do some Q&A for the GUI way of disabling them, noting that the SEO points to this question for "macOS disable cmd shift a"?
    – cubuspl42
    Mar 27 at 15:57

3 Answers 3

7

In Ventura, this is in a new location System Settings / Keyboard / Keyboard Shortcuts... / Services / text

enter image description here:

enter image description here

2

When you disable these keyboard shortcuts via the UI, you're effectively adding the following key-value pair to the NSServicesStatus dictionary in the pbs domain:

"com.apple.Terminal - Search man Page Index in Terminal - searchManPages" = {
  "enabled_context_menu" = 0;
  "enabled_services_menu" = 0;
  "presentation_modes" = {
    ContextMenu = 0;
    ServicesMenu = 0;
  };
};

To do this via the CLI, you can write it in XML-encoded form using -dict-add:

VALUE='<dict><key>enabled_context_menu</key><false/><key>enabled_services_menu</key><false/><key>presentation_modes</key><dict><key>ContextMenu</key><false/><key>ServicesMenu</key><false/></dict></dict>'

defaults write pbs NSServicesStatus \
  -dict-add \
  'com.apple.Terminal - Open man Page in Terminal - openManPage' \
  "$VALUE"
defaults write pbs NSServicesStatus \
  -dict-add \
  'com.apple.Terminal - Search man Page Index in Terminal - searchManPages' \
  "$VALUE"
0

There isn't a (documented) command to delete a dictionary key item, but you can replace an existing dictionary key:

defaults write <whatever_the_file_is> -dict-add "Insert Bookmark" -string "@^b"

where @ is for the Command key, ^ is CTRL, $ is for shift, and ~ is for Alt.

So you'll need to provide another key sequence that you're not going to use. Obviously, you'll need to work out what the file is.

3
  • Yes, those keys don't trigger those Services in Terminal. They trigger those Services when I'm using IntelliJ Idea. I don't want to trigger them at all. I want to is to disable them using some CLI command. Jun 14, 2021 at 16:26
  • If you never want them on, does it have to be a CLI command?
    – benwiggy
    Jun 14, 2021 at 16:42
  • 2
    @benwiggly those two are default setting. I want to disable those shortcuts as part of my macos setup scripts. Over the past years, I disabled them manually several times and at this point I want to automate it. For other shortcuts I managed to do it, for these I can't find the way. Jun 15, 2021 at 17:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .