Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.8, 5.12.4, 5.14.0 Beta 1
Description
Pressing a dead key (for example ^) does not generate any keypress event but generates a keyrelease one.
The following example shows the issue pretty well. When pressing ^ and then e, I'm getting both keyreleases and a ê appears in the QLineEdit. I would expect Qt not to eat the keypress event. (Same thing happens without the QLineEdit).
#include <QApplication> #include <QKeyEvent> #include <QLineEdit> #include <QWidget> #include <QtGui> class KeyPress : public QWidget { Q_OBJECT public: KeyPress(QWidget *parent = nullptr) : QWidget(parent) { new QLineEdit(this); } protected: void keyPressEvent(QKeyEvent *event) override final { qDebug() << "press" << event->key() << event->text(); } void keyReleaseEvent(QKeyEvent *event) override final { qDebug() << "release" << event->key() << event->text(); } }; int main(int argc, char *argv[]) { QApplication a(argc, argv); KeyPress *keyPress = new KeyPress(); keyPress->show(); return a.exec(); }
Is there any way to actually get those keypress events ? Is this maybe considered a normal behavior ?
Attachments
Issue Links
- is duplicated by
-
QTBUG-111732 Deadkey KeyPress events not delivered to custom event handler on international keyboards
- Closed
-
QTBUG-41665 QKeyEvent not send on linux for composed characters
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-79216 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
307606,5 | Fixup XCB compose key events when compositing | dev | qt/qtbase | Status: ABANDONED | 0 | 0 |