I'm capturing keyEvents to play a sound when a key is pressed. This works fine on latin keyboards, but if I use a Russian keyboard layout, none of the Cyrillic characters generate a keyEvent. For example the code below will print "here" if I type any key with my keyboard layout set to U.S., but if I set it to Russian, Arabic, or presumably any non-latin keyboard layout I get nothing. What do I have to do to capture non-latin keyboard events?

Qt Code:
  1. bool NCTextEdit::eventFilter(QObject *object, QEvent *event)
  2. {
  3. if (event->type() == QEvent::KeyPress) {
  4. QTextCursor cursor;
  5. QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
  6. qDebug("here");
  7. }
  8. }
To copy to clipboard, switch view to plain text mode