Friday, 23 August 2013

Colon/Semicolon remapping with xmodmap with two active setxkbmap layouts

Colon/Semicolon remapping with xmodmap with two active setxkbmap layouts

Gentlemen,
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

No comments:

Post a Comment