I use Qt Embedded and I have a board with some keypad. I use eventFilter and check for QKeyEvent for my widget, but for only two buttons Qt doesn't react to. eventFilter isn't called. Here is code:
bool eventFilter(QObject* parent, QEvent* event)
{
qDebug() << "entered";
switch (event->type())
{
case QEvent::KeyPress:
{
QKeyEvent* key_event = qobject_cast<QKeyEvent*>(event);
qDebug() << key_event->key();
}
}
}
But physic keys work and driver too. I can listen it from /dev/event2.
Has anybody struggled with it? Thanks.
As a test, you could try installing a QWSServer::KeyboardFilter before instantiating the App. And see if the QWSServer is getting the key.
If not, then I would suggest looking at the keymap used by the QWS server (look up environment variable QWS_KEYBOARD). Both the default US key map and in my case, the custom gb.qmap didn't map all the keys.