Virtual keyboard changes system keyboard layout under sway - why?

Justus-dev at Piater.name Justus-dev at Piater.name
Mon Apr 6 17:29:21 UTC 2020


Hello Dorota,

Dorota Czaplejewicz <dorota.czaplejewicz at puri.sm> wrote on Mon, 6 Apr
2020 16:22:28 +0200:

> I've observed that there is a global layout switch, and with multiple
> physical keyboards, I found that switching the layout affects all of
> them.

In my sway config I specify a German layout for all input devices:

  input "*" xkb_layout de

If I then run

  swaymsg input "ID of external keyboard" xkb_layout en_US

my external keyboard switches to the en_US layout while my laptop's
internal keyboard keeps its German layout.  I can specify keyboard
layouts independently for each input device ID.

Presumably OSKs hook into the system at a very different level than
these hardware devices.

> Therefore, to make the on-screen keyboard work "as expected", I
> decided to make it follow that central authority (gnome input method
> setting).

I agree and confirm that squeekboard picks up the language I set using
gsettings.

> Frankly, what you're saying sounds sensible, but I don't know how to
> solve it on the application level without making things overly
> complicated. If you do

No, I was hoping you did :-) I cannot make time to dive into it now, but
if/when I do before someone beats me to it I'll definitely be in touch.

Best,
Justus


More information about the wayland-devel mailing list