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?


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.

| improve this answer | |

Your Answer

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

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