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.

Eliah Kagan
  • 117,780
Anders
  • 211
  • 1
    Copy and paste from another site? e.g. http://www.linfo.org/vertical_bar_character.html –  Sep 30 '17 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 '17 at 20:36
  • I selected Sweden and Swedish keyboard in the installation. I can try to reinstall with all american settings!? – Anders Sep 30 '17 at 21:05
  • Press the Alt Gr key and and after that the key between z and shift to get | in a Swedish keyboard. (This key has < , > and | in a Swedish keyboard.) – sudodus Sep 30 '17 at 21:32
  • Thank you!!! I thought that that was another symbol. It looks more like a long ":" meaning it is a gap in between/not a compete line like "|" when i type it in lubutu. – Anders Oct 01 '17 at 07:55
  • Is it suppose to look like the long ":" in Lubutu? – Anders Oct 01 '17 at 07:57
  • 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 01 '17 at 08:28
  • @Anders, You are welcome :-) – sudodus Oct 01 '17 at 12:57
  • 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 03 '17 at 18:01
  • on my keyboard shift+\ makes | – Dipak Gaikwad Jul 16 '22 at 04:13

5 Answers5

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.

sudodus
  • 46,324
  • 5
  • 88
  • 152
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.

Redbob
  • 1,596
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"

vault
  • 11
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.

dessert
  • 39,982
  • There's no key | at least on my keyboard, you probably mean the < key. – dessert Oct 03 '17 at 17:59
  • 1
    Just checked this link for Swedish layout ; https://documentation.vizrt.com/viz-easycut-guide/4.12/vizeasycut_usersguide_swedish_keyboard_layout.html and it shows the third level select key (AltGr) just like my German KB. Is yours somehow non-standard? – David Walker Oct 03 '17 at 18:06
  • Well, on some keyboards, several symbols are printed on the keys, for example this one, https://i.stack.imgur.com/ZkNZR.jpg, so you could say | key (not only < key, @dessert). – sudodus Oct 03 '17 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 03 '17 at 18:15