wayalnd client wants to know the keyboard layout
Daniel Stone
daniel at fooishbar.org
Thu Jan 14 08:19:19 PST 2016
Hi,
On 14 January 2016 at 14:54, Hardening <rdp.effort at gmail.com> wrote:
> I have worked on having the FreeRDP client have a decent wayland
> support. On the graphical part everything is quite straight forward
> anyway, I'm hitting some troubles with keyboard support (someone could
> say as usual when you code something around keyboard).
>
> In X11, xfreerdp queries X about the keyboard layout using XI. That
> allows to announce a RDP keyboard layout to the remote server (using a
> map table between xkb files and RDP layout) and get the correct virtual
> RDP keycode.
>
> But in wayland, I only get the mmaped xkb file, I can't see a robust and
> easy way to discover to which xkb file it corresponds. If someone has an
> idea...
Part of the problem is that we just don't know, since we're fairly
unique amongst OSes in terms of allowing custom user keyboard layouts.
So even if we did provide names, then it would fall down as RDP
probably doesn't have an Icelandic Dvorak map, or four variants of
French Dvorak, or the Belarusian US-hybrid layout. There are also a
few cases where we can't provide names, such as in X11 where the user
has uploaded a custom keymap, or run xmodmap which changes it.
So, for that reason[0], we opted not to provide names at all. The best
I can suggest is programmatic matching, to find the keymap the one you
have most resembles.
Cheers,
Daniel
[0]: Or really, a variant of: the problem is that if you provide
names, people will ignore the map entirely and just compile names on
their own. Which will miss customisations, and provide needless extra
compiles, and and and ...
More information about the wayland-devel
mailing list