My low cost keyboard does not have a less/greater/pipe key....
So I mapped a special key, to the less/greater/pipe key
# find out the keycode of the special key, for me it was 148
xev
# set Strg_r to Mode_switch -> Strg_r + special key will print pipe
sudo xmodmap -e "keycode 0x69 = Mode_switch Mode_switch Mode_switch Mode_switch"
# set key binding for special key. Replace the keycode with your keycode
sudo xmodmap -e "keycode 148 = less greater bar"
See also
https://askubuntu.com/questions/24916/how-do-i-remap-certain-keys-or-devices
https://unix.stackexchange.com/questions/249122/why-do-my-xmodmap-binds-involving-altgr-only-work-on-some-keys
setxkbmap de