What the Pipe key does
The pipe | chains commands in terminals (ls | grep), means "or" in programming (a || b), and separates columns in Markdown tables. The broken bar ¦ on UK keyboards is a different character (U+00A6) and will not work in commands.
On a Mac
Shift+\ above return.
On a laptop
Same rule as the backslash: US above Enter, UK next to left Shift.
Shortcuts that use the Pipe key
| Shortcut | What it does |
|---|---|
| Shift+\ | Pipe | |
| Alt+124 | Pipe via Alt code |
| Alt Gr+` (UK) | Broken bar ¦, not the pipe |
| Ctrl+Shift+\ (VS Code) | Jump to matching bracket |
If the Pipe key is missing or not working
If commands fail with a "¦" in them, you typed the broken bar (UK Alt Gr+`) instead of the pipe (Shift+\). Test the key below.
Test it here: click the tester, press the key, and it should light up green. A red key is stuck; a key that never lights up is dead or intercepted by the system. The full keyboard tester has the press log and more detail.
Click the tester, then press any key. Browser shortcuts are blocked while it has focus.
—
- key
- —
- code
- —
- keyCode
- —
none
Max at once: 0 (rollover)
None detected. A key held for more than 2 seconds is flagged.
Frequently asked questions
How do I type the pipe symbol? +
Shift+\ (the backslash key). On UK keyboards the key is next to the left Shift.
Why does my pipe look broken (¦)? +
That is the broken bar, a different character on UK keyboards under Alt Gr+`. Use Shift+\ for the real pipe.
What is the pipe symbol used for? +
Chaining commands in terminals, logical OR in code (||), and column separators in Markdown tables.