toto_tata
toto_tata

Reputation: 15402

Xcode/Mac: keyboard shortcut to type the "OR" sign "||" (double vertical bar)?

Each time I have to copy paste "||" from elsewhere when I want to type the double vertical bar of the OR sign.

Is there a keyboard shortcut to type it?

Upvotes: 19

Views: 90020

Answers (15)

wzor3k
wzor3k

Reputation: 21

2021 MacBook Pro 14" UK keyboard

|| --> shift + backslash

below you can find a graphic representation ;)

2021 MacBook pro uk keyboard OR operator

Upvotes: 1

LAOMUSIC ARTS
LAOMUSIC ARTS

Reputation: 628

For macs with German keyboards, press:

ALT + 7

Upvotes: 1

Martin Rohwedder
Martin Rohwedder

Reputation: 1751

I have a Macbook with Danish keyboard, and for me I use the Alt+i, to make the | operand.

Upvotes: 15

in my m1 2022 pro option(alt) + -

Upvotes: 0

Yavuz Tarhan
Yavuz Tarhan

Reputation: 576

for TURKISH QWERTY MBP 16" 2019

option + <

Upvotes: 1

tif
tif

Reputation: 1149

On Swedish keyboard this worked for me: Opt + 7

Upvotes: 5

nashCode
nashCode

Reputation: 73

In my keyboard works with: ALT + 1

Upvotes: 3

Martin De Simone
Martin De Simone

Reputation: 2148

None of this worked for me, my solution was SHIFT + /

Upvotes: 0

J.W
J.W

Reputation: 1215

This worked for me: CTRL + Alt + <

Upvotes: 0

Djama
Djama

Reputation: 791

OnMac keyboard type: Shift + Alt + L to get | sign

Upvotes: 0

Lilla Eli
Lilla Eli

Reputation: 291

That did not work for me either. But this one did:

Alt+ 7 with the Alt key on the right side of the keyboard or Ctrl + Alt + 7 with the Alt key on the left side

Upvotes: 22

Damian Green
Damian Green

Reputation: 7495

I am using a UK external keyboard and I had to use Shift ~.

The ~ key is next to carriage return and also has the # symbol

Upvotes: 1

andyb
andyb

Reputation: 43823

This site lists the shortcut as Shift+Alt+L if you use a Mac keyboard. But the "pipe" symbol does actually exist on the Mac UK keyboard so can't you just press that key twice?

Upvotes: 26

user3263514
user3263514

Reputation: 1

Use right alt + (. The key is to the right of the ? key on my keyboard.

Upvotes: 0

Mert Buran
Mert Buran

Reputation: 3017

It is Shift + Alt + "I" for Turkish QWERTY users. Shift + Alt + "L" did not work for me, even with U.S. input source.

Upvotes: 3

Related Questions