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

--- Comment #4 from esperluett...@proton.me ---
I continue to investigate this, but I found a Qt ticket
(https://bugreports.qt.io/browse/QTBUG-79216) that explains that "Qt only
generates keyReleaseEvent() for dead keys", confirming that it's on Qt side.

Testing with xev show "correctly" (if I understand the output correctly) that
press and release events are generated on a single press.
Pressing "a" gives:
> KeyPress event, serial 39, synthetic NO, window 0x1200001,
>    root 0x3c9, subw 0x0, time 17983802, (86,0), root:(219,356),
>    state 0x0, keycode 24 (keysym 0x61, a), same_screen YES,
>    XLookupString gives 1 bytes: (61) "a"
>    XmbLookupString gives 1 bytes: (61) "a"
>    XFilterEvent returns: False
> KeyRelease event, serial 39, synthetic NO, window 0x1200001,
>    root 0x3c9, subw 0x0, time 17983857, (86,0), root:(219,356),
>    state 0x0, keycode 24 (keysym 0x61, a), same_screen YES,
>    XLookupString gives 1 bytes: (61) "a"
>    XFilterEvent returns: False

And pressing accent key (aka dead key) "^" also gives two events:
> KeyPress event, serial 39, synthetic NO, window 0x1200001,
>    root 0x3c9, subw 0x0, time 17985745, (86,0), root:(219,356),
>    state 0x0, keycode 34 (keysym 0xfe52, dead_circumflex), same_screen YES,
>    XLookupString gives 1 bytes: (5e) "^"
>    XmbLookupString gives 0 bytes: 
>    XFilterEvent returns: True
> KeyRelease event, serial 39, synthetic NO, window 0x1200001,
>    root 0x3c9, subw 0x0, time 17985793, (86,0), root:(219,356),
>    state 0x0, keycode 34 (keysym 0xfe52, dead_circumflex), same_screen YES,
>    XLookupString gives 1 bytes: (5e) "^"
>    XFilterEvent returns: False

So I seems like Qt ignores the dead key (as not a "real" key event) before
merging it with next character (certainly to lookup if the accent + character
is a valid and so, a single character, or not valid and outputs two
characters), but I need more investigation to understand where exactly the
event is "lost", if may be recoverable or not by KDE, or if Qt prevents it
completely (since Qt team don't seem to change this behaviour, and so, I will
close this ticket).

The consequence of this may not only be visual, like in the case for this
ticket: https://bugs.kde.org/show_bug.cgi?id=464822

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

Reply via email to