Site icon Treehouse Blog

How to Type Special Characters Without Dedicated Keys

Want to boost your tech skills? Start a 7-day free trial of Treehouse Courses—55% off for new students for a limited time using this link!


Not having every special character readily available on your keyboard can be frustrating—especially when you’re programming, working in the command line, or writing technical documentation.

Two of the most commonly used symbols in coding and terminal environments are the backslash (\) and pipe (|). If these characters aren’t visible on your keyboard, don’t worry—there are simple methods to type them on both Windows and Mac.

For Windows Users

Method 1: Using Alt Codes

You can type special characters by holding the Alt key and entering a numeric code:

✅ Make sure Num Lock is turned on and use the numeric keypad (not the top number row).

Method 2: Using Character Map

Windows includes a built-in utility for typing and copying any symbol.

  1. Open the Start menu, type Character Map, and open the app.
  2. Check the “Advanced view” box.
  3. Search for “backslash” or “vertical line.”
  4. Select the character → click Select → click Copy.
  5. Paste it wherever you need it.

For Mac Users

Method 1: Keyboard Shortcuts

Most special characters can be typed using key combinations:

Note: These shortcuts may vary slightly depending on your keyboard layout (especially international ones).

Method 2: Keyboard Viewer

MacOS provides a virtual keyboard to help visualize and use special characters.

To enable it:

  1. Go to System Settings > Keyboard
  2. Under “Text Input,” click Edit…
  3. Enable “Show Input Menu in menu bar”

To use it:

  1. Click the Input Menu icon in the menu bar
  2. Select Show Keyboard Viewer
  3. Hold down the Option key to see available special characters
  4. Click a character to type it

Bonus: Keyboard Viewers & Symbol Tools

On Windows:

On Mac:


Learn the Basics

Want to understand more than just symbols? Build your technical fluency in Treehouse’s Digital Literacy Track. It’s perfect for beginners navigating tech tools and workflows.


FAQs

How do I type a pipe symbol (|) on Windows?

Use Alt + 124 on the numeric keypad.

How do I type a backslash (\) on Windows?

Use Alt + 092 on the numeric keypad.

What if my laptop doesn’t have a numeric keypad?

Use the On-Screen Keyboard (Windows) or Keyboard Viewer (Mac) to access symbols visually.

Can I copy and paste the symbols instead?

Absolutely—use tools like Character Map or Emoji & Symbols to copy/paste special characters.


Conclusion: Mastering Special Characters

Lacking certain keys on your keyboard doesn’t have to hold you back. Whether you’re coding, writing, or navigating technical tools, learning how to type special characters like \ and | gives you control and speed.

From Alt codes and keyboard shortcuts to on-screen viewers, there’s a solution for every system. Once you get familiar with these options, you’ll never be stuck hunting for a symbol again.

Read more:

Exit mobile version