How do I catch a tilde keypress with Qt?
Code:
{ switch(event->key()) { case Qt::Key_?????: { //do something... } break; default: break; } }
Qt defines 5 different Tilde keys (for accented charactors), and I can't find the right one I'm supposed to use.
The five are:
Qt::Key_AsciiTilde (I tried it, and can't seem to catch it)
Qt::Key_Atilde (These are for accented charactors - Didn't try them)
Qt::Key_Ntilde
Qt::Key_Otilde
Qt::Key_Dead_Tilde (Not sure what this is, but tried it, couldn't catch it).
Other keys work (I can catch Qt::Key_Escape), so I didn't mess up with the code itself. How do I catch the tilde key (the key under the Escape key on standard US Qwerty keyboards)?