Keyboard layout unable to recognize pipe

Having the same problem (using Fedora 27), and xmodmap doesn’t seem to work to fix the mapping. I have got it fixed in the console with a loadkeys command, but that does not seem to carry over to the graphical environment

# in a console (e.g. Ctl+Alt+F3)
$ cat bar_fix.kmap 
keymaps 0-127
keycode 86 = backslash
shift keycode 86 = bar
$ sudo loadkeys bar_fix.kmap

But in a terminal window the following

$ xmodmap -e "keycode 86 = backslash bar"

theoretically should work, but seems to have no effect.