Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use Swedish(Dvorak) as keyboard layout on Ubuntu.

I bought a new keyboard and with the current layout I miss the pipe key. I want to change one of my keys to produce a pipe instead of it's ordinary key. Is there a file that contains all the current mappings? Should I not be able to change for instance keycode X to produce the pipe instead of keycode Y?

I do not mind hard coding the Swedish(Dvorak) file as it is just one row I want to change. I would also not want any hack that requires more software or other dependencies, I just want to change that file.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I had a similar problem and uses xmodmap like that to start bc with ., rather than , in the number block:

xmodmap -e "keycode 91 = period period" && bc
xmodmap -e "keycode 91 = KP_Delete KP_Separator"

The first symbol is for normal key press, the second with shift.

You can use xmodmap in your startup scripts. The symbol for | is bar. Keycode for | is on my (german) layout 94.

You can find out what the keycode for your keys is with xev. It will open a small box and you see the keypress (and mouse) events in the terminal.

share|improve this answer
    
Very many thanks! –  Simon Zettervall Jan 17 '13 at 8:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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