In this article, you’ll learn how to type special characters without dedicated keyboard keys.
Not having every special character readily available on your keyboard can be frustrating, especially when programming, navigating directories in a command line, or writing documentation. Two commonly used special characters or symbols in various technical contexts are the backslash (\) and the pipe (|). If these aren’t visible on your keyboard, don’t worry—there are several workarounds you can use to type these characters. (Learn more foundational basics in our Digital Literacy Track!)
Contents
For Windows Users
Using Alt Codes
If your keyboard lacks a specific key, you can use Alt codes to type the characters you need:
- Backslash (\): Hold down the Alt key and type 092 on the numeric keypad.
- Pipe (|): Hold down the Alt key and type 124 on the numeric keypad.
Ensure that Num Lock is on when you type these codes using the numeric keypad.
Using Character Map
Windows includes a utility called Character Map that allows you to find and copy any character:
- Open the Start menu, type Character Map, and open the app.
- Check the “Advanced view” box to search for a character by name.
- In the search box, type backslash or vertical line and press Enter.
- Select the character, click “Select,” then “Copy,” and paste it where you need it.
For Mac Users
Using Keyboard Shortcuts
MacOS makes it relatively easy to type most characters using keyboard shortcuts:
- Backslash (\): Press Shift + Option + 7 (on some layouts, this might vary).
- Pipe (|): Press Option + Shift + L (on some layouts, this might vary).
Using the Keyboard Viewer
Mac also offers a Keyboard Viewer, which is an excellent tool for visualizing and accessing special characters:
1. First, ensure the Input Menu icon is visible in your menu bar:
- Go to System Settings > Keyboard
- Under “Text Input,” click “Edit…”
- Enable “Show Input menu in menu bar”
2. Once the Input Menu icon is visible, click on it and select “Show Keyboard Viewer”
3. A virtual representation of your keyboard will appear on screen
4. To see special characters:
- Press and hold the Option key on your physical keyboard
- The Keyboard Viewer will display all available special characters for each key
5. To type a special character, simply click on it in the Keyboard Viewer
This method is particularly useful for finding and typing characters that aren’t immediately obvious on your keyboard layout. It’s also a great way to learn the key combinations for frequently used special characters, allowing you to type them more quickly in the future.
Conclusion
Lacking certain keys on a keyboard shouldn’t stop you from accessing the characters you need for your work or personal projects. Whether you’re using Windows, Mac, or Linux, there are several methods available—from Alt codes to special utilities like the Character Map or Emoji & Symbols viewer. With these tools and techniques, you’ll be able to navigate this minor inconvenience efficiently and continue your tasks without disruption.
Land Your Dream Front End Web Developer Job in 2024!
Learn to code with Treehouse Techdegree’s curated curriculum full of real-world projects and alongside incredible student support. Build your portfolio. Get certified. Land your dream job in tech. Sign up for a free, 7-day trial today!
Start a Free Trial