https://bugs.kde.org/show_bug.cgi?id=489021

Nicolas Fella <nicolas.fe...@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nicolas.fe...@gmx.de

--- Comment #5 from Nicolas Fella <nicolas.fe...@gmx.de> ---
(In reply to Zachary Freed from comment #3)
> I'm the person implementing the aforementioned auto-type feature in
> KeepassXC.
> 
> I've tracked down the source of the issue to the Xkb class in
> src/waylandintegration.cpp, it seems like the implementer got mixed up
> between the client and server. The keymap is correctly obtained through the
> `keyboard_keymap` event, and a state is created from that keymap. At the
> start of `keycodeFromKeysym`, the layout is attempted to be obtained from
> the state through calling `xkb_state_serialize_layout`.
> 
> However, as the desktop portal is acting as a XKB client here, it is
> supposed to be tracking the state itself, and the
> `xkb_state_serialize_layout` is for server applications to send the layout
> to clients. Because the desktop portal is using a default state, without
> tracking anything, this will always return the first defined layout in the
> keymap, meaning regardless of what layouts are configured, the first layout
> in the defined order will determine what keys are pressed to produce a
> symbol (with obviously terrible results if you use a non qwerty layout). 
> 
> The correct implementation doesn't require an `xkb_state` to be created at
> all. Rather,  the `keyboard_modifiers` event should be implemented, which I
> believe is called by the display server whenever the group (aka layout) is
> changed, and that value can then be passed to the rest of the
> `keycodeFromKeysym` function

Thanks for the analysis, that makes sense to me.

Unfortunately I don't think your suggestion of using keyboard_modifiers will
work. xdg-desktop-portal-kde is a background process with no UI, so it doesn't
get (most) wl_keyboard events from the compositor because it's not the active
window

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to