32 if (event->type() == QEvent::KeyPress)
34 QKeyEvent* keyEvent =
static_cast<QKeyEvent*
>(event);
36 if ((!keyEvent->isAutoRepeat()) && (!
isComposeKey(static_cast<Qt::Key>(keyEvent->key()))))
40 Qt::KeyboardModifiers keyModifiers;
49 else if (
m_release && (event->type()==QEvent::KeyRelease))
51 QKeyEvent* keyEvent =
static_cast<QKeyEvent*
>(event);
53 if ((!keyEvent->isAutoRepeat()) && (!
isComposeKey(static_cast<Qt::Key>(keyEvent->key()))))
57 Qt::KeyboardModifiers keyModifiers;
67 return QObject::eventFilter(obj, event);
72 key =
static_cast<Qt::Key
>(e->key());
76 keyModifiers = e->modifiers();
80 keyModifiers = Qt::NoModifier;
bool m_release
check release events
void keyEventHandler(QKeyEvent *e, Qt::Key &key, Qt::KeyboardModifiers &keyModifiers)
bool m_pass
do not block events just tap them
static const std::vector< Qt::Key > m_composeKeys
void capturedKey(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release)
bool isComposeKey(Qt::Key key)
bool eventFilter(QObject *obj, QEvent *event)