Skip to content

2 smaller backports to qtvirtualkeyboard

[PATCH 1/2] Fix high CPU utilization caused by key repeat timer

Key repeat timer has been broken since the beginning.

The key repeat timer leaked timer instances while processing the event,
causing the accumulation of unprocessed timer events and high CPU

Fix the issue by killing the original timer (long press delay 600 ms)
and starting the key repeat timer (repeat delay 50 ms) once.

[ChangeLog] Fixed high CPU utilization caused by key repeat timer.

Pick-to: 5.12 5.15 6.1 6.2
Fixes: QTBUG-94259
Change-Id: Iff47249db27cda3750f497cb02c1cb642261e032
Reviewed-by: Jarkko Koivikko <>
(cherry picked from commit 63a944ff12580f2c333a162ecaecd12419a39c10)

[PATCH 2/2] Fix processing of hard Qt::Key_Backspace and Qt::Key_Delete

Even though the virtual keyboard does not support hard keys at the
moment, this kind of processing could be possible in the future.

In the mean time, fix processing of backspace and delete keys.

In particular, if such key is pressed the pre-edit text is not empty:

- Reset input method state (should not modify pre-edit)
- Clear pre-edit
- Return true (to indicate no further processing is required)

[ChangeLog] Fix processing of hard backspace and delete keys.

Fixes: QTBUG-94017
Pick-to: 5.15 6.1 6.2
Change-Id: I7035f7612e966de6d17d92e754ecd7bdb3a6e530
Reviewed-by: Jarkko Koivikko <>
(cherry picked from commit ca5b712dfc8e67aece0eb7374ffe5921e2aa45e8)

Merge request reports