How to type \ on a ABC keyboard

\

Press “\”.

Not your keyboard? You are viewing: ABC
Press “\”.escF1F2F3F4F5F6F7F8F9F10F11F12`~1!2@3#4$5%6^7&8*9(0)-_=+⌫⇥QWERTYUIOP[{]}\|⇪ASDFGHJKL;:'"↩⇧ZXCVBNM,<.>/?⇧fn⌃⌥⌘⌘⌥◀▲▼▶

Try it on your keyboard: the keys you press light up.

What is the backslash for?

The backslash \ is mostly used in computing:

  • Windows paths: C:\Users\Jane\Documents;
  • escape sequences in strings: \n for a new line, \t for a tab, \" for a quote;
  • LaTeX commands: \frac{1}{2}, \section{Introduction};
  • regular expressions: \d for a digit, \. for a literal dot;
  • line continuation in shell scripts.

Pitfalls

  • Do not confuse it with the forward slash /, used in web addresses and in macOS and Linux paths. On a Mac, paths use /, never \.
  • On this layout: \. French Mac layouts have no backslash printed on the keys: ⌥ Option+⇧ Shift+:.
  • In some Japanese fonts the backslash is drawn as a yen sign ¥: a display issue, not a keyboard one.

\ on each layout

SystemLayoutKey combination
macOS French – Numerical ⌥ Option+⇧ Shift+:
macOS French ⌥ Option+⇧ Shift+:
macOS Belgian ⌥ Option+⇧ Shift+:
macOS Swiss French ⌥ Option+⇧ Shift+7
macOS Canadian Multilingual (CSA) ⇧ Shift+/
macOS Canadian French \
macOS Spanish ⌥ Option+º
macOS Latin American ⌥ Option+'
macOS U.S. \
macOS ABC \
macOS U.S. International – PC \

Other methods

Character Viewer

Press fn + E (or Control + Command + Space) to open the Character Viewer, search for “\” by name, then double-click it to insert it.

Text replacement

In System Settings › Keyboard › Text Replacements, map a shortcut (for example “;;x”) to the character \: it will be inserted automatically in most apps.

\ technical details

Unicode code pointU+005C
Official Unicode nameREVERSE SOLIDUS
HTML entity&#92;
CSScontent: "\5C";
JavaScript / JSON"\u005C"
UTF-8 bytes5C
URL encoding%5C

The official name comes from the Unicode Character Database (ICU).

Related characters

Practice on this layout

Report a mistake

The combination does not work for you? Tell us what happens (macOS version, keyboard, what appears).