Note to close-voters: There is a meta question concerning the on-topicness of this question. Please provide an answer or comment. A comment from downvoters wouldn't hurt either.

The UK QWERTY keyboard layout has the button labelled with a split pipe type an unsplit pipe | (via Shift + \) and the button labelled with an unsplit pipe type a split pipe ¦ (via Ctrl + Alt + ` or Alt Gr + `).

The France AZERTY and Germany QWERTZ layouts have a single split pipe ¦ that types an unsplit pipe | (via Alt Gr + 6 and Alt Gr + < respectively).

The France AZERTY keyboard layout, courtesy Wikimedia Commons contributors:

The France keyboard layout

When and why did the convention of labelling keys with the "wrong" bar(s) on keyboards for PCs originate?

  • 6
    Because they're the same character, at least historically. Whether the character was displayed with one line segment or two was a choice of the font. en.wikipedia.org/wiki/… – Ross Ridge Jun 24 '17 at 14:39
  • 6
    If they're the same character they can't be the wrong way around. It's relatively modern notation that they're separate characters, one that's not observed well in practice. My keyboard has a | key with no break in it. It always generates an ASCII 0x7c character value, but whether or not that ASCII character is displayed as unbroken or broken vertical line depends on the font. In this comment text it's unbroken, in a Windows console it's broken. No US keyboard I have has two | keys, just one, usually a broken one. Your "US layout" laptop is either an exception or not actually a US layout. – Ross Ridge Jun 24 '17 at 16:25
  • 3
    Because the notion that they're separate characters isn't respected. There are lots of characters that have multiple Unicode code points, but in ordinary usage are considered the same character. Consider A and A which may or may not be drawn differently but are both the upper case letter A to most people. – Ross Ridge Jun 24 '17 at 16:36
  • 4
    Not sure this is a retro question... – Joe Jun 24 '17 at 17:55
  • 3
    @Joe I've asked about it on meta. Please contribute an answer including your reasoning. – wizzwizz4 Jun 24 '17 at 19:38

ASCII was designed from the start with usable subsets (for instance an uppercase subset representable with six bits, consisting of the four central columns) and international variants. SHARE (IBM users' group) insisted that all characters needed for PL/I, included the vertical bar, were present in the uppercase subset(*). That was solved by allowing ! to be represented as a vertical bar, and by breaking the vertical bar present in the international non six-bit subset (7C). Later a broken bar was introduced in the upper part of latin-1 (A6).

The usage of breaking the character 7C persisted, notably in the ROM fonts of early IBM PC (for instance this Wikipedia capture of the ROM font of a VGA card). And we have the current situation where some fonts are using the broken bar for 7C although they shouldn't (doing a google image search for "ASCII bitmap font" shows both usages). Fonts for Latin-1 or Unicode (which shares the definition of graphical characters with Latin-1) tend to keep with the official definition (I've not found any which does not when writing this, but I'm pretty sure that in the past I've seen fonts which showed a broken bar for 7C and a continuous bar for 6A).

Keyboards show the same variations as fonts. Some have the key intended to type 7C showing a broken bar, others an unbroken one (I've just looked at mine, all have the French layout you give but two have a non-broken bar, one a broken one on key 6).


* depending on sources, they insisted that it was in the non variable part as well

| improve this answer | |
  • Why does this mean that the keys are labelled wrong? Could you elaborate? – wizzwizz4 Jun 27 '17 at 16:17
  • The keys were wrongly labelled probably because many people thought they were the same thing. This was what it looked like on some of the incorrectly labelled CRT consoles. It isn't until you use the pipe command in DOS or the or operator in C and get an error that you find out whether you've typed ¦ instead of |. In the early 80s, I spent ages trying to figure out why ¦ was giving errors. It took a while to locate |. – cup Jul 1 '17 at 6:05
  • Was the caret/up-arrow used or the "not" character in PL/I? – supercat Jun 14 '18 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.