Unable to type '|' (pipe, bar) character
Solution 1
Found this in the Arch Wiki related to the notebook in question. It works for me on my German keyboard. Perhaps it can also be applied to other devices.
As of writing this answer Ubuntu 19.04 uses the buggy systemd v240. Until the package is upgraded on the official repository, here's a workaround from the wiki I've linked:
For a UK keyboard it is the backslash/pipe key and you can correct the scancode to keycode mapping with
# setkeycodes 56 86
Note: I found that setkeycodes 56 86
must be entered before the x11 session is created. The wiki recommends putting this command in a script file and invoking it via systemd on boot.
Solution 2
A workaround:
If you define a compose key, you can type the | character (Vertical Line) by pressing:
Compose followed by V followed by L
Related videos on Youtube
ChiefGokhlayeh
Updated on September 18, 2022Comments
-
ChiefGokhlayeh over 1 year
I've upgraded to Ubuntu 19.04 recently to do some testing, but I quickly had to realize that my pipe character (|) on my laptop keyboard does not get recognized correctly as such. Instead a single-quote (') is inserted. I'm on a GS65 notebook that houses a steelseries keyboard which has some rather wanky key-layout to begin with. The layout I'm using is German. (picture for reference: https://www.notebookcheck.com/fileadmin/Notebooks/MSI/GS65_8RF-019DE_Stealth_Thin/gs65_15.jpg)
I tried the usual
dpkg-reconfigure keyboard-layout
+ "Gerneric w/ 105 keys" + restart, but that didn't solve my issue. Note all other keys do work fine (including special German characters ä, ö, ü, ß). It's only this one key that tries to mess with me.The issue only occurs on the internal keyboard. Using a USB keyboard everything works fine. Aside from that the issue persists both on tty and graphical interface.
Interestingly that means that my single-quote is mapped twice. One being above the ENTER key, and the other one wrongly assigned to "<, >, |" next to ALT-GR. This holds true for other keyboard layouts such as English US aswell.
Did I perhaps select the wrong keyboard-layout? If so, what would be the correct option?
Btw. the issue only occured after upgrading from 18.04 LTS to 19.04.
-
Gunnar Hjalmarsson almost 5 yearsI would suspect that you need some other keyboard model than Generic 105-key. If you run
dpkg-reconfigure keyboard-configuration
again you'll find that there are quite a few other options, including e.g. SteelSeries Apex 300. Not saying this is it, but worth a try IMO. -
RaptoX almost 5 yearsHey, I have the same problem ... Any solutions other solutions?
-
-
ChiefGokhlayeh almost 5 yearsAfter tying out literally every keyboard layout (yes it took a while, and yes some broke my input) none of the layouts brought the desired effect. With Your fix I was at least able to do some work. In the end I decided to go back to 18.04 LTS where now everything works fine again. Could this perhaps be a more fundamental bug with the new kernel? (just guessing into the wild here)
-
Gunnar Hjalmarsson almost 5 years@Chief_Gokhlayeh: I don't know, the kernel stuff is over my head. One thing I know is that the
xkb-data
package, which provides the options for both layouts and models, is the same version in 19.04 as in 18.04. But yes, the kernel is involved somehow. Maybe ask a new question, where you include "kernel" in the list of tags. That way someone with sufficient skill may see it. -
ChiefGokhlayeh over 4 yearsLooks like someone found the underlying issue: wiki.archlinux.org/index.php/… To my knowledge Ubuntu 19.04 still uses systemd v240, so one could either manually upgrade systemd or use the workaround described in the wiki, until the Ubuntu package maintainers upgrade systemd.