Detect keyboard layout in GTK 3?

335 views Asked by At

Is there a way to detect the current keyboard layout (i.e. "us", "de", "de_CH", "it"...) under GTK3 in a portable way? I don't need mswindows compatilibity, only linux, but it should work with both Xorg and Wayland backends and under different desktop environments.

I have found the GdkKeymap class and gdk_keymap_get_for_display() function, but I can't see a function to get an identifier for the nationality/model/map of the keyboard.

Thank you

0

There are 0 answers