[Qt-interest] Dead key detection
Claus Tøndering
claus at tondering.dk
Wed Jul 15 09:41:19 CEST 2009
I'm running Qt under Windows Vista.
Many non-English keyboards have so-called "dead keys" which are used for
entering accented letters: First you press the accent key (and apparently
nothing happens), then you press the letter key and, bingo, an accented
letter appears in your text.
In standard Windows programming (win32), the sequence of events is this:
When you press and release the dead key: WM_KEYDOWN, WM_DEADCHAR, WM_KEYUP
When you press and release the letter key: WM_KEYDOWN, WM_CHAR, WM_KEYUP
In Qt, I would dearly love to be able to detect when the user presses a dead
key. However, my Qt widget only receives keyPressEvent and keyReleaseEvent
when the actual letter key is pressed and released, not when the dead key is
pressed.
How can I detect that the user has pressed a dead key (before they press the
letter key)?
--
Claus Tondering
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090715/66102388/attachment.html
More information about the Qt-interest-old
mailing list