I'm on a Norwegian keyboard and use setxkbmap us
to code. Sometimes I communicate in Norwegian. This requires me to setxkbmap no
. That is rather annoying. I would like to remap the AltGr with another key to output the å
character.
I've run xev
and å
has the byte code c3a5
on key symbol 34, with the name 'aring'. I have remapped it in a keydef file as:
keycode 34 = bracketleft braceleft aring Aring
Then I ran xmodmap ~/keydef
. For some reason whenever I press AltGr and ], nothing shows up. What am I doing wrong?
Answer
Perhaps you don't have AltGr and Mode_switch on the same modifier, see the output of
xmodmap -pm
However, you might like to read this very useful archlinux page on keyboard configuration. They suggest you would be better off doing, eg:
localectl --no-convert set-x11-keymap us,no pc104 grp:caps_toggle
which creates a permanent setup which shifts between the 2 mappings us
and no
by pressing the caps lock key. Lots of other toggle keys are available. List them with:
grep "grp:.*toggle" /usr/share/X11/xkb/rules/base.lst
The temporary setxkbmap equivalent is probably (not tested)
setxkbmap us,no pc104 '' grp:caps_toggle
but for those who dont read the comments, this is what finally worked for OP:
setxkbmap -model pc104 -layout us,no -option grp:alt_shift_toggle
No comments:
Post a Comment