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

I'm using a Hungarian Apple Alu keyboard. It works well, apart from that the 0 and the í keys are swapped. I read here that it could be re-mapped with an .Xmodmap file in the home folder.

What I don't know is how could I find out the appropriate keycodes to override? Is there maybe some "spy" tool that echoes keys pressed?

share|improve this question
up vote 1 down vote accepted

I figured it out:

To get the keycodes to override the command is xmodmap -pke.

And in order to fix the swapped keys you have to insert these two lines in the ~/.Xmodmap file:

keycode 49 = iacute Iacute backslash bar less greater
keycode 94 = 0 section doublelowquotemark rightdoublequotemark notsign notsign grave asciitilde

To apply the settings launch the command

xmodmap ~/.Xmodmap

And you're done.

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.