3

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.

I use Linux mint xcfe.

2

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'

  • 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 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.