Cant set my xkb's xkeymap with xkbcomp

Peter Hutterer peter.hutterer at
Sun Jan 3 23:54:40 UTC 2021

On Sat, Dec 19, 2020 at 01:04:50AM +0200, aprekates wrote:
> Sorry my first 'reading on Peter's answer wasnt correct.
> I wrote :
> <<But as you said setxkbmap -print will show just a mapping from MLVO
> options to a Ktcsg include commands.>> But this isnt what Peter said. It was
> a false interpretation of mine.
> setxkbmap -print  CAN display the current xkeymap (in Ktcsg format ) but
> only if the change happened from setxkbmap itself.
> So Peter says it correct but i think there are more to say, since for
> example the way those two utilities change xkeymaps differs.

setxkbmap uses XkbRF_GetNamesProp() to fetch the _XKB_RULES_NAMES propery
values, then uses those as base configuration. It never actually queries the
server's keymap directly. xkbcomp doesn't change that property, so its
changes aren't visible to setxkbmap.

too many tools doing one thing only, not enough integration between them :(

> On 17/12/20 5:50 π.μ., Peter Hutterer wrote:
> > > But testing with  $ setxkbmap  -print
> > > 
> > > i see that my current xkeymap hasnt change . But i can change it with
> > > setxkbmap.
> > setxkbmap -print doesn't use the keymap directly as you'd expect. it uses
> > the RMLVO properties, changing a keymap directly with xkbcomp isn't
> > reflected in the setxkbmap output. so simply said: this is a false negative.
> > > Why xkbcomp doest seem to work?
> > check with xkbcomp -xkb $DISPLAY xkbmap.out and compare that file with the
> > keymap before and after. where xkbcomp uploads the correct data and the
> > server accepts everything, the file will reflect the changes you made.
> > 

More information about the xorg mailing list