23

This question already has an answer here:

With the default Raspberry Pi keyboard layout and a US keyboard, when I press Shift+| the result would be ~

and if I press on ~ or Shift+~ I would get a different symbol.

marked as duplicate by goldilocks Mar 22 '18 at 15:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Although the duplicate concerns another key, the issue is the same: The default keyboard configuration on Raspbian is for a UK keyboard. Note the accepted answer here will not solve that problem. The easiest way to do this is via raspi-config: raspberrypi.stackexchange.com/a/7485/5538 – goldilocks Mar 22 '18 at 15:51
27

Do other keys not function as you wish, as well? Such as # outputting ?

  1. Make sure you have set the correct locales and default locale using sudo raspi-config.

  2. sudo locale

    • Make sure these are what you think they should be
  3. sudo dpkg-reconfigure keyboard-configuration

  4. sudo reboot

  • This worked once I rebooted; tyvm! – Andrew Nov 21 '17 at 23:39
  • While this is what most people should do, it's very frustrating that people who genuinely have this need are lead here by Google and find a question the was never answered. (This is an alternative rather than an answer.) I created a duplicate of this question to get an actual solution. raspberrypi.stackexchange.com/a/81599/8375 And there is at least 1 solution at this point. – Bruno Bronosky Mar 20 '18 at 17:07
3

You can get the | (pipe) symbol using the Shift + \ shortcut. The Shift can be found on the left side of your keyboard, on the second row from bottom.

The \ (backslash) key can usually be found above the Enter key (on the fourth row from bottom).

keyboard with backslash between Enter and Backspace

On other keyboards, it is located on the left side of a keyboard, next to the Shift key: keyboard with backslash on the left

(images are edited versions of pictures found on http://www.wpclipart.com/computer/hardware/keyboard/keyboard_black.png.html and http://www.keyboardco.com/keyboard_images/black_foreign_chicony_keyboard_large.jpg)

  • 2
    i used to wonder when SE will start giving answers about "any key", seems like this day has come. nice pics, though =) – lenik May 18 '13 at 12:12
  • 2
    A good answer for a question that should never have been asked... – daviewales May 18 '13 at 12:37
  • 6
    it doesn't work. That is why I asked the question, I thought it is because of the "gb"(UK) layout, hence I asked for future reference. PS: thank you for the detailed answer – Suhaib May 18 '13 at 13:15
  • 2
    You really need to put a lot more detail in your question. Perhaps post a picture of your keyboard, and tell us what symbols appear when you press different keys. That way we can determine what keyboard layout you have, and what you should change it to. (You can do this using raspi-config) – daviewales May 18 '13 at 13:58
  • 6
    The problem is that this user has UK locale vs US locale set up. This causes problems with |, as well as ~ and others. – earthmeLon May 12 '14 at 17:15

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