1

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?

2

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.

  • Good ideas! Also, I could use the source editor/inspect element an insert said code if the app doesn't support it being directly inserted. – goose121 Sep 29 '15 at 18:24

You must log in to answer this question.

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