MacOS – Non-Breaking Hyphen Sequence Interpreted as Cmd-hyphen (Zoom out)

google-chromekeyboardmacos

I'm trying to insert a non-breaking hyphen into a web app in Google Chrome. The key sequence is ⌘⇧-. Whenever I type this key sequence into a program (tested Notes, Textedit, and Chrome itself), it is interpreted as ⌘-, which is mapped to either reduce text size or zoom out. How can I enter non-breaking hyphens without using the character viewer and why does this peculiar behaviour occur?

Best Answer

To enter a non-breaking hyphen in Google Chrome just enter &#8209;: ‑ (<- check the source by opening my answer in the edit mode).
The underlaying web app has to support this though.

A universal method to enter a non-breaking hyphen for all apps is to enable "Unicode Hex Input" from System Preferences -> Keyboard -> Input Source, choose it in the menubar and enter alt2011.

For Apple and probably some other apps you may set up an auto correct entry like nbhy -> ‑. You have to type nbhyspacedelete to add a non-breaking hyphen then.

With apps like Karabiner or Ukelele you may reduce the effort by remapping key strokes.


I still have to investigate the behavior to add an explanation why this happens.