21

I can't type |. I have tried to press and hold Ctrl and Shift and then press and release U and then type 007c but nothing happens.

I do not know if I make the wrong sequence of pressing and holding. I get crazy! I am trying to enter the command:

sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list

This is for my pinball 2000 running on Lubuntu/pinbox.

I selected Sweden and Swedish keyboard in the installation.

11
  • 1
    Copy and paste from another site? e.g. linfo.org/vertical_bar_character.html
    – user4815
    Sep 30, 2017 at 20:36
  • 6
    Which language / keyboard are you using? The key / key combination for the pipe character depends strongly on the language / keyboard.
    – sudodus
    Sep 30, 2017 at 20:36
  • I selected Sweden and Swedish keyboard in the installation. I can try to reinstall with all american settings!?
    – Anders
    Sep 30, 2017 at 21:05
  • 1
    In some fonts the pipe character looks like two vertical bars with a small space between. (I guess that is what you mean. I think in most fonts it is one solid vertical bar, but I have seen it as two vertical bars with a small space between, and that is what it looks like on the key of some keyboards.)
    – sudodus
    Oct 1, 2017 at 8:28
  • 1
    By the way, pasting in a terminal works with either Ctrl+Shift+V or by selecting the text to paste and pressing the middle mouse button where it should be pasted. Especially the last one is great for fast copying oneliners like yours.
    – dessert
    Oct 3, 2017 at 18:01

6 Answers 6

24

Key combination to type the pipe character in a Swedish keyboard

Press the Alt Gr key and and after that the key between z and shift to get | in a Swedish keyboard. (This key has < (default), > (with shift) and | (with Alt Gr) in a Swedish keyboard.)

I think in most fonts the pipe character is one solid vertical bar, but I have seen it as two vertical bars with a small space between, and that is what it looks like on the key of some keyboards, like the picture in this link.

onboard helps explore keys and key combinations

enter image description here

You can install onboard and use it to explore which keys and key combinations to use to type various letters, digits and symbols in different languages.

1
  • Worked on an Acer running CentOs on VirtualBox: AltGr + the ~ (left to number 1). Mar 20, 2020 at 14:11
4

I tried to do exactly as you tried, Anders. My keyboard is Brazilian (ABNT), so I have similar keyboard peculiarities and annoyances, as signals and accents, too.

According to this other issue, I pressed Enter at the end of the same sequence you tried to do, to make it work.

I think if you repeat the sequence you tried at your question, finally pressEnter (*), it will works!

PS: Don`t forget to release CtrlAlt after press U.

(*)space works,too.

6
  • The second sentence of the question is exactly this.
    – muru
    Oct 4, 2017 at 0:52
  • @muru, I edited my answer. See if it's suitable, now.
    – Redbob
    Oct 4, 2017 at 1:55
  • You don't need to press Enter specifically - Spacebar would do too.
    – muru
    Oct 4, 2017 at 2:06
  • Exactly @muru, It worked. I tested any other key, none of them worked. Do you know anyelse?
    – Redbob
    Oct 4, 2017 at 2:12
  • Tapping Shift or Ctrl as well (not holding, since capital A-E are valid characters here). Tapping Super or Alt cancels.
    – muru
    Oct 4, 2017 at 2:19
1

I had this problem too. With a Ducky 65% keyboard the button Ubuntu assigned to vertical pipe wasn't physically existent. I ended up adding a cronjob on boot that uses xmodmap to set vertbar to keyboards altgr+6. This is the command: xmodmap -e "keycode 15 = 6 ampersand 6 asciicircum bar fiveeighths"

1

I found this symbol by holding down Shift and pressing the # button.

0

I cannot follow your problem. I just changed my German keyboard for the purpose of trying to understand your problem by typing setxkbmap se on the command line, and Alt Gr + | got the same result as when using setxkbmap de.

4
  • There's no key | at least on my keyboard, you probably mean the < key.
    – dessert
    Oct 3, 2017 at 17:59
  • 1
    Just checked this link for Swedish layout ; documentation.vizrt.com/viz-easycut-guide/4.12/… and it shows the third level select key (AltGr) just like my German KB. Is yours somehow non-standard? Oct 3, 2017 at 18:06
  • Well, on some keyboards, several symbols are printed on the keys, for example this one, i.stack.imgur.com/ZkNZR.jpg, so you could say | key (not only < key, @dessert).
    – sudodus
    Oct 3, 2017 at 18:06
  • @DavidWalker, there was confusion because the symbol on the OPs key was not a solid vertical bar, but two vertical bars with a small space between, which "looks like a long : ". We solved that issue via comments.
    – sudodus
    Oct 3, 2017 at 18:15
0

I found the pipe on my arabian keyboard: AltGr+~.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .