Anyway to update `xkb_keymap` after `wl_display_run` ?

Daniel Stone daniel at fooishbar.org
Mon Aug 26 11:29:56 UTC 2019


Hi Sichem,

On Mon, 26 Aug 2019 at 02:38, Sichem Zhou <sichem.zh at gmail.com> wrote:
> I found that currently there is no way to change `xkb_keymap` after Weston is running.
>
> By different backends, xkb_info in wayland works differently, for example, the wayland and x11 backend, weston_keyboard is initialized with whatever the xkb_rules initialized in current environment and they do not use global xkb_info. While in DRM backend, all weston_keyboards seem to use the global keymap.  It can be changed by setting up `weston_compositor_set_xkb_rules` before `weston_compositor_wake`. After that, there is nothing I can do. It is used to be possible to call `weston_seat_update_keymap`, but It is now an internal API. Even by that I think it would be a nasty way to change keymap.
>
>
> I am wondering why in weston_compositor_set_xkb_rules, there is only updates for rules itself rather than updating `compositor->xkb_info`. If possible, I think it should be a quick fix, I can submit a MR for it.

Sure. But why do you say that `weston_seat_update_keymap` is a 'nasty'
way to change it?

Cheers,
Daniel


More information about the wayland-devel mailing list