Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
5.5.1, 5.8.0 Beta
-
None
-
ubuntu 16.04 with qt 5.5.1, also verified with 5.8.0
-
21f976f4f0f79b1c4c77a402ebed88d8afb3d9e1
Description
This relates to ubuntu 16.04:
When pressing down a key and holding it, keyReleaseEvent sometimes wrongly reports isAutoRepeat as false. This has been reported infrequently by others (QTBUG-20387, https://forum.qt.io/topic/68803/problem-with-qkeyevent-isautorepeat-function, http://stackoverflow.com/questions/38102221/qkeyevent-isautorepeat-not-working#38122074).
To track it down, I messed with the event-lookahead for keypress in qtbase/src/plugins/platforms/xcb/qxcbkeyboard.cpp:1525. After adding a short usleep, allowing the outstanding generated events to arrive made the problem completely go away:
// look ahead for auto-repeat KeyChecker checker(source->xcb_window(), code, time, state); usleep (500); // On my (old and outworn slow laptop (Intel® Celeron(R) CPU N2830 @ 2.16GHz × 2)):100: very rarely sometimes false key-releases 200: ok. xcb_generic_event_t *event = connection()->checkEvent(checker);
So maybe it would be helpful to add such a usleep
Attachments
Issue Links
- relates to
-
QTBUG-69679 QXcbConnection::KeyChecker::m_release looks redundant
-
- Closed
-
-
QTBUG-34542 QML - Key.onReleased event fired when the key has not been released
-
- Closed
-
-
QTBUG-46422 Windows: strange isAutoRepeat behaviour
-
- Closed
-