Skip to content

Port key events away from QKeyEvent

Vlad Zahorodnii requested to merge work/zzag/keyboard-events into master

Qt input events don't work as intended. If there are two input events, one will overwrite some data of the other even though they are not really connected.

This change ports our internal key event type away from QKeyEvent to resolve those issues. It fixes testX11Window being flaky, and it makes the data in the events more intuitive, specifically the modifiers.

Another advantage of the new event type is that it encodes repetition in the state enum so one needs to consider it when writing new code. While porting kwin to the new event type, I've noticed a few places where key repetition may not be handled as expected, for example in the sticky keys event filter.

See https://bugreports.qt.io/browse/QTBUG-121987

Edited by Vlad Zahorodnii

Merge request reports

Loading