Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My "return" key is broken. I followed the instructions here: - hoping to reassign my | key as the new return key. My .xmodmaprc file reads as follows:

keycode 51 = 36

But the | key does not act as a return key. Nothing has changed. Any ideas what I might be doing wrong? Thanks so much for any suggestions.

share|improve this question
Have you tried logging in and out? – Ciaran Liedeman Oct 18 '11 at 18:43
Thank you for replying - I ended up being able to make it work by using Autokey. – begtognen Nov 1 '11 at 15:00

Your xmodmap expression is wrong. It needs to be formatted like this:

keycode [keycode] = [keysym]

The keysym is the symbol name of the key you want the "|" key mapped to, which in your case is "Return". So your xmodmap expression needs to be:

keycode 51 = Return

Putting everything back together, the command you want to run is:

[~]$ xmodmap -e "keycode 51 = Return"

(Don't type the [~]$ part, I'm just indicating that you need to run that from terminal).

If you want this to run each time you log in create a file called ~/.Xmodmap with the following contents:

keycode 51 = Return

I hope that works.

share|improve this answer

You need to run the following in a terminal:

xmodmap ~/.xmodmaprc

share|improve this answer

Your Answer


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.