[Qt-interest] Dead key detection

Claus Tøndering claus at tondering.dk
Wed Jul 15 16:06:35 CEST 2009


Thiago Macieira wrote:

> Em Quarta-feira 15 Julho 2009, às 09:41:19, Claus Tøndering escreveu:
> > How can I detect that the user has pressed a dead key (before they 
> > press the letter key)?

> You can't with standard Qt events, because it consumes the DEADCHAR
> event and hides that from you.

> If you really need to detect the deadkey, you probably can do that
> via the winEventFilter in the QApplication class.

> Can you explain why you need to detect the dead keys pressing?

Thank you for your answer.

Someone else pointed out to me in a private mail that I could use the
winEvent method, which I wasn't aware of, and it works perfectly and solves
my problem. I guess winEventFilter would work as well.

I am writing a virtual keyboard application to enable the typing of Greek,
Hebrew, Russian etc. for people who for some reason are not willing to
install a full keyboard driver for that language. This means that I have to
activate functionality with every single keypress, regardless of whether it
is a normal key or a dead key. 

Cheers,
Claus





More information about the Qt-interest-old mailing list