xkb layouts load after keypress

Peter Hutterer peter.hutterer at who-t.net
Mon Aug 26 14:56:05 PDT 2013


On Mon, Aug 26, 2013 at 09:48:38PM +0700, Nikita Mikhailov wrote:
> Hello.
> 
> I noticed that keyboard layouts specified in xorg.conf's InputClass
> load only after keypress. Until that, only us layout is
> available("pc+us+inet(evdev)").
> I really want to know all layouts before keypress, what can I do for that?

that's not quite true as such. the layouts are loaded when the device is
added (look at your Xorg.log). however, the infrastructure in the server
means we have a bunch of so-called 'slave devices' (the physical devices)
and a pair of so-called master devices (the cursor and the keyboard focus).
when a device generates an event, that event is routed through the master
device. if the slave device has a different layout than the master device,
the master is switched to the new layout on the fly, so you can have two
keyboards with different layouts plugged in at the same time.

because the master can only have one layout at a time, I suspect what you're
seeing is one device (the last one added) having a 'us' layout, while your
config applies a non-US layout to the rest. regardless of that, the first
key press should always be in the correct layout, if that is not the case,
then that's a bug. however, for historical reasons some clients only see the
current layout of the master, and thus think (and display) that it is
english when the layout will switch once you start typing.

Cheers,
   Peter


More information about the xorg mailing list