MacOS – Is it possible to disable a default keyboard shortcut for a special character, without the use of third-party software

customizationmacosshortcuttext;

I have set + M to execute the command "Paste and Match Style", system-wide. I assigned this custom shortcut at the following location:

System PreferencesKeyboardApp ShortcutsAll Applications

However, instead of the desired effect of pasting and matching style, pressing + M on my keyboard usually types the character µ instead. Only every so often does my shortcut randomly function correctly.

How can I disable the assignment of this special character to my shortcut, so that the shortcut is dedicated to my user-defined command? I never have the need to type this Mu character, so I have no problem with ridding it from my keyboard entirely.

I understand that one can use a re-mapping program (such as Karabiner.app) as a workaround to accomplish this. But, does Apple offer a built-in way to remove special character shortcuts?

Best Answer

As a workaround, since I know you use FastScripts, here's a suggestion.

Undo the changes you made in System Preferences > Keyboard > Application Shortcuts > All Applications, by first changing ⌥M back to ⌥⇧⌘V, then delete the Paste and Match Style command you added. Note that you could probably just delete it without first reseting it to its default key sequence, however I do it this way to insure it gets reset properly.

With things back to normal, create an AppleScript .scpt using the code below, saving it as Paste and Match Style.scpt in the Users Script Folder (~/Library/Scripts).

tell application "System Events" to key code 9 using {option down, shift down, command down}

Note that you can also use keystroke "v" in place of key code 9, I just prefer to use key code over keystroke most of the time.

In FastScripts > Preferences... > Script Shortcuts, assign ⌥M to: Paste and Match Style

Now you will not get the µ character when pressing ⌥M when FastScripts is running.