GNOME Bugzilla – Bug 148891
not possible to configure keyboard layout when run in Xnest
Last modified: 2009-08-15 18:40:50 UTC
Open a "new session in a window" (don't know how this is called in english), e.g. run Xnest from within gnome and log in (with another account or again with the current one doesn't matter). Try to configure the keyboard layout. This doesn't work. You cannot configure the keyboard itself (how many keys are actually present) nor the layout (the mapping). This is "bad" because I cannot use ~ or | in the xnest-window (german keyboard-layout with 105-key). xev when run in xnest correctly returns "dead tilde" and "bar" when pressing the keycombo ("alt_gr"(mode_shift) + "+" and "alt_gr" + "<" respectively), but this doesn't work in gedit or gnome-terminal.
oops:((( Just one question: does Xnest provide XKB extension? Could you please try: xdpyinfo | grep XK
Well, my xnest-session doesn't seem to have it. So changing the layout may not be possible on the fly at all/by design? But I still wonder why my usual combo for the pipe on my keyboard (keys labeled <Alt Gr> + "<") work with xev, but take me to the first entry in my bash's command history (I failed to figure out what key it acutally gets) in gnome-terminal. When I switch from a 105-key one to a 102-key one, the combo still is the same in my regular session.. But it doesn't default to an english layout, the regular umlauts that are accessible directly or using deadkeys work as expected, the layout is a german one and matches a 105-key one (as present physically). Even compose sequences work perfectly. So what doesn't work is using modeswitch. So maybe this issue should really be "gnome in xnest ignores Mode_shift"... (xev, run in a gnome-terminal within xnset correcly accepts it. Other modifiers ("num_lock", "multi_key") work as expected. But on the other hand, it doesn't ignore it... I don't get the "<" but a different character/code.
Actually, I got a good idea. What about filing a bug in xorg bugzilla - regarding xkb support in xnest?
Hmm.. Seems that recent versions of gnome-applets have a fallback-mechanism in the gswitchit-applet that will take care of the keyboard layout when XKB-extension is not available. So the initial problem (modeshift non functional) is no longer an issue. Switching keyboard layouts is possible as well. One tradeoff though: gnome-keyboard-properties now crashes when launched - but I can live with that. I will resolve this notgnome.
and closing.