I'm a non-native english speaker and need a second language layout. And I'm a heavy Vim user, and use : much more often than ;. At the moment they are remapped in .vimrc, buth that causes confusion when I'm in console (and everywhere else), so I decided to remap them directly in .xinitrc (I know I can put it in .Xmodmap).

The following works fine:

setxkbmap -layout us,ru -option grp:toggle # change layout with AltGr
xmodmap -e "keycode 47 = colon semicolon" # remap : and ;

except that that key only works in us layout. If I switch to ru it does absolutely nothing, not even [semi]colon (expected it to print 'ж' and 'Ж').

I know xmodmap is responsible for translation KEYCODE to a KEYSYM, and I'm messing that up, but I would at least expect it to print capital letter instead of lowercase and vice versa.

Is there something I'm doing completely wrong or am I just missing something?

PS Archlinux Linux version 3.10.3-1-ARCH


Okay, seems it needs to be passed as a third KEYSYM argument:

xmodmap -e "keycode 47 = colon semicolon Cyrillic_ZHE"

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.