Fix MacOS Open parentheses + c or + r replaces text with copyright symbol or registerd trademark symbol

Trying to type (c… or (r…

There have been a number of post on this. The general take has been that it is a MacOS issue. However there is an easy fix that does not involve using any snippets or plugins.

Part of the problem is MacOS keyboard behaviour and part might be Obsidian typing behaviour. Obsidian adds the paired closing paren as soon as you type the first one. This triggers the MacOS text replacement even though the cursor is still between the now pair of parentheses.

Suggested Solution

MacOS settings. Change keyboard > text replacement entries for copyright and registered trademark. Replacing the text replacement using a two character sequence which would never be used for numbering would work well.

  • Navigate to Settings > Keyboard > Text Replacement
  • Remove the entries for © and ®
  • Add a new entry for copyright for example (cr) and assign it the © by typing ⌥ + G
  • Add a new entry for registered trademark (re) and assign it to ® by typing ⌥ + R

What do you think about this behavior? I think text replacement shouldn’t happen in this case although it is unclear whose problem that is — should Apple work on it or Obsidian developer team?

This is macOS’ text replacement behavior, not Obsidian’s. You would need to turn off text replacement in your macOS settings.

Personally, I prefer to use the keyboard shortcut rather than automatically replace text.

I think Apple uses (C) and (R) to market its text replacement feature. Most users don’t need symbols © and ® specifically but they may want to use text replacement for things like m², ℃ and special spaces like x + y (U+205F), phrase1 — phrase2 (U+200A)

Comparison:

special normal
x + y x + y
phrase1 — phrase2 phrase1—phrase2
phrase1 — phrase2 phrase1—phrase2

Edit: U+205F and U+200A are not recognized here. I believe U+2009 isn’t supported as well.

Thanks for taking an interest. Very fair question. I think that a good proportion of Obsidian users are Mac users. Further, the Obsidian team are more nimble than the apple MacOS keybaord developers.

Another de facto standard and paradigm is to see the pairing of brackets as a type of text “auto-completion”. In this paradigm software editors and computer terminal programs place the suggested text completion after the cursor, but greyed out. i.e. It is not yet part of the text and does not leak into the MacOS text replacement functionality. Only when {tab} key is entered is the greyed out, suggested text inserted. I think it is commonly referred to as Tab Auto-completion.

Below is a Post requesting the Tab behaviour.

However if the auto-completion paradigm were to replace the auto pairing, the standard approach would be to simply close the bracket around the c or r and leave it up to the MacOS settings as to whether to replace the text or not.

In short I think that most developers would be more comfortable with having the same behaviour across all the editors they use, rather than different behaviour, in which case rather do what VSCode etc etc do.

Exiting automatic pairing with the tab key