Being a Linux user, as most Linux users, I use the pipe symbol (|) daily.

I'm currently sitting at a Swedish keyboard. There are three keys on the keyboard that (together with an orgy of four or five other symbols) have the pipe symbol on it:

Swedish keyboard with pipe symbol highlighted

But for the life of me, I can't figure out how to make the pipe symbol materialize on the screen, and no amount of alt-gr-ing seems to get me there.

How can I type the pipe symbol (|) on a Swedish keyboard?

  • I have such annoyances, even with a UK keyboard. If you're on Ubuntu (and possibly other Debian derivatives) you can open System Settings -> Text Entry: at the bottom right of the list of input sources there is a keyboard icon. If you click on this it will show you the keyboard map and it will highlight each key you press. This will confirm which key codes are sent from each of the keys with the current keyboard map. – AFH Sep 15 '15 at 17:36
  • That is one hell of a messy keyboard :D – undo Sep 15 '15 at 17:37
  • try RIGHT alt+7?? – undo Sep 15 '15 at 17:39
  • @RahulBasu That results in { (which by the way, is also a key I type hundreds of times a day and is really annoying to press, especially since I'm used to a US keyboard) – IQAndreas Sep 15 '15 at 17:47
  • Do you have AltGr key? Maybe the right side Alt with the key next to the backspace? – Raystafarian Sep 15 '15 at 17:51
  • Danish: Alt Gr+´` found to the right of +?\.
  • Norwegian: §½ found to the left of 1!.
  • Norwegian with Sami: §½ found to the left of 1!.
  • Swedish: Alt Gr+<> found to the left of Z.
  • Swedish with Sami: Alt Gr+<> found to the left of Z.

If you couldn't get a single | by using Alt Gr, you are most likely using the Norwegian layout.


The keyboard layout is not "Swedish", it's the "Nordic" layout, used in Denmark, Norway, Sweeden and such. I'm not sure if it works with Linux, but on Windows with the Danish layout, it's "Alt Gr" + the key to the left of the backspace.

enter image description here


It is an old question, but since nobody gave the easy answer:

alt + 124

124 is the decimal equivalent for the | character in the ASCII table.


I'm using Windows 10, configured with a Swedish keyboard and for me, I press Alt Gr and the <>| key (the key in the red box at the bottom left of your diagram).


I had the same problem with Fedora 26. I used to get the pipe character when Fedora 23 was installed with AltGR + <>|. But instead of |, it outputs ı, which is i without the dot ("idotless").

Using xev, I saw:

KeyRelease event, serial 36, synthetic NO, window 0x5400001,
    root 0x296, subw 0x0, time 1097943857, (464,363), root:(509,472),
    state 0x80, keycode 31 (keysym 0x2b9, idotless), same_screen YES,
    XLookupString gives 2 bytes: (c4 b1) "ı"
    XFilterEvent returns: False

I used xmodmap to fix it back:

$ **xmodmap -e "keycode 31 = i I i I bar brokenbar"**

(it was keycode 31 = i I i I idotless bar)

Now it works.
And xev now shows:

KeyRelease event, serial 36, synthetic NO, window 0x5400001,
    root 0x296, subw 0x0, time 1099965050, (534,-197), root:(534,404),
    state 0x80, keycode 31 (keysym 0x7c, bar), same_screen YES,
    XLookupString gives 1 bytes: (7c) "|"
    XFilterEvent returns: False

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.