Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 am using a swiss apple keyboard at the moment. This keyboard requires some unreasonable finger acrobatics to type a backslash (shift+right alt+7). I'd like to bind the backslash to another key combination, specifically shift+4, which right now produces a "ç" which I never need.

Has anybody done something like that? I don't have any idea how to do that and I have not found any help yet. I use Linux mint xcfe.

Thanks in advance for your help.

share|improve this question
up vote 2 down vote accepted

For permanent solution issue command in console:

echo 'keycode 13 = 4 backslash 4 ccedilla onequarter dollar onequarter' >> $HOME/.Xmodmap

then switch layout or issue xmodmap - < $HOME/.Xmodmap

For a one time (or to be executed at each startup from $HOME/.xinitrc): xmodmap -e 'keycode 13 = 4 backslash 4 ccedilla onequarter dollar onequarter'

share|improve this answer
Did you forget to remove the initial 4? – Emanuel Berg Feb 1 '13 at 2:23
Nope, that's needed: otherwise you would get a `` on pressing the 4 key alone. – Endre Szabo Feb 1 '13 at 8:37
In that case, I don't understand the syntax. xmodmap -e 'keycode 79 = 4 backslash' gives my the digit 4 for the numpad key "7" (= 79; got that from xev), dropping the backslash gives the same result; xmodmap -e 'keycode 79 = backslash' on the other hand gives me a backslash for the same key. This seems straightforward, but apparently not so? – Emanuel Berg Feb 1 '13 at 20:03

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.