How to do a backslash on Windows & Mac?

The inverted slash , also called backslash or antislash , is a very useful character in certain areas such as programming or DOS commands . It is written “\” and is distinct from the normal slash, which is written “/” . But how to make this symbol on an azerty or qwerty keyboard? Here are some tips to achieve this easily.

What is the backslash and what is it for?

What is the backslash and what is it for?

The backslash is a character that was invented in 1960 by Bob Bemer , an American computer scientist who worked on early computers. He created it to solve the problem of ambiguity between the minus sign and the hyphen . He chose this symbol because it was not used in programming languages ​​of the time.

The backslash has several uses depending on the context:

  • In programming languages ​​such as C, C ++, Java or Python , it is used to indicate a special character or an exhaust sequence. For example, "\ n" represents a line jump, "\ t" a tab, "\" " a double quotation, etc.
  • Windows commands , it is used to separate elements of a file or folder path. For example, “C:\ Windows \System32” System32 folder located on disk C.
  • In regular expressions, it is used to escape a character that has a particular meaning. For example, “\d” represents a number, “\w” a letter or number, “\s” a space, etc.
  • In certain software such as Excel or Word, it is used to insert functions or formulas. For example, “=SUM(A1:A10)” calculates the sum of the values ​​from cell A1 to cell A10. Likewise, to do a subtraction in Excel , simply use the minus sign (-) between two values ​​or two cell references. For example, “=B1-B2” subtracts the value of cell B2 from that of cell B1.

How to do a backslash on an azerty keyboard?

backlit wired keyboard with footrest

On a French azerty keyboard, the backslash is not directly accessible. You must therefore use a key combination to make it appear. There are two possibilities :

  • Type your ASCII code by holding down the Alt key and entering 92 on the numeric keypad.
  • Use the key combination Alt Gr + 8 (or Ctrl + Alt + 8) on some keyboards.

How to do a backslash on a qwerty keyboard?

How to do a backslash on a qwerty keyboard?

On a Canadian or American qwerty keyboard , the backslash is easier to obtain. Simply press the key located at the top left of the keyboard , below the Esc . On some keyboards, you have to press the Shift key at the same time.

How to do a backslash on Mac?

How to do a backslash on Mac?

On Mac, the backslash is also accessible via a key combination. You must simultaneously press the Alt (or Option) and Shift keys and the / key (which is next to the point) .

FAQs

What is the difference between slash and backslash?

The slash is written as “/” and the backslash is written as “\” . The slash is used in particular to separate the elements of a URL or to indicate a fraction. The backslash is used in particular to indicate a special character or to separate elements of a path.

How to make a slash on an azerty keyboard?

To make a slash on an azerty keyboard, you must press the / key (which is located next to the dot) or use the key combination Alt Gr + / (or Ctrl + Alt + /) .

How to make a slash on a qwerty keyboard?

To make a slash on a qwerty keyboard, you must press the / key (which is next to the dot) or use the key combination Shift + 7 .

How to do a slash on Mac?

To make a slash on Mac, you must press the / key (which is located next to the dot) Alt (or Option) + / key combination .

How to copy and paste a backslash?

To copy and paste a backslash, select it with the mouse or keyboard, then use the shortcut Ctrl + C to copy it and Ctrl + V to paste it. On Mac, you have to use the Cmd instead of Ctrl .

Conclusion

The backslash is a character that has many uses depending on the context. It is not always easy to type on an azerty or qwerty keyboard , but there are tips to achieve it . On Mac, you have to use a specific key combination . You now know how to make this symbol on Windows and Mac . But do you know the principles of object-oriented programming ? It is a programming paradigm that allows you to structure code using concepts like classes, objects, inheritance or polymorphism . If you want to learn more about this exciting topic, you can check out our detailed tutorial on our website.

Previous article How to activate VoWifi and VoLTE on your Xiaomi Smartphone?
Next article How to make an upside down question mark ¿
Hello me, it's François :) Editor in my spare time who loves sharing his passion: TT High tech! 😍 Whether it's hardware, software, video games, social media and many other areas on the site. I share with you my analyses, my tests, tutorials and my favorites on various media. I am a knowledgeable and demanding technophile, who does not just follow fashion, but who seeks to guide you towards the best solutions. So stay tuned!