Borken bar instead of vertical bar Ubuntu Server 14.04

I'm trying to write a script in Ubuntu Server 14.04. When I press the key for a vertical bar "|" my screen shows a broken bar "¦"

My keyboard is in spanish and the layout is latinamerican. All other keys are shown perfectly on the screen.

Could you help understand whats going on?

1

1 Answer

As a workaround you can use Unicode for that:

Ctrl+Shift+u

007C

Enter

or with this command:

xmodmap -e "keycode 24 = bar"

check the value for keycode with:

xev

sample output:

KeyPress event, serial 36, synthetic NO, window 0x2a00001, root 0x233, subw 0x0, time 31839373, (54,162), root:(54,226), state 0x90, keycode 94 (keysym 0x7c, bar), same_screen YES, XLookupString gives 1 bytes: (7c) "|" XmbLookupString gives 1 bytes: (7c) "|" XFilterEvent returns: False

make it permanent with this steps:

Open the file .xinitrc

nano ~/.xinitrc

and add this line:

xmodmap ~/.Xmodmap

Open the file .Xmodmap

nano ~/.Xmodmap

and add this line

keycode 24 = bar

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like