[Qt-interest] blocked keyevents in embedded linux using qt.
slheitz at rockwellcollins.com
slheitz at rockwellcollins.com
Thu Nov 19 22:38:00 CET 2009
I have written a keyboarddriver plugin.
I have am using Qsocketnotifier to signal me when the keyboard character
device has been updated.
keypadhandler
{
KeypadFD = open("/dev/mydevice", O_RDONLY | O_NONBLOCK, 0);
Notify = new QSocketNotifier(KeypadFD, QSocketNotifier::Read, this);
connect(Notify, SIGNAL(activated(int)), this,
SLOT(ReadKeypadData()));
}
Then my readdata file runs off of the qsockettnotifiersignal.
ReadKeypadData
{
uint n = read(KeypadFD, KeyPress1, sizeof(KeyPress1));
then I determine what key it is and translate it to a Qt key event and
call process keyevent.
processKeyEvent(EXTENDED_UNICODE, qtkey, Qt::NoModifier, true, false);
}
My issue is that when I hit a key the first time it runs through the
readdata function and I see that it executes and runs processkeyevent. But
no key event shows up in my running server app. Then when I hit the key
agian I see that it
runs through the readdata function and I see that it processes the
previous key and the current one. So the first key is always getting held
up until I hit another key then it gets sent along with the second key.
Any Ideas?
Thanks
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091119/cdf6c71f/attachment.html
More information about the Qt-interest-old
mailing list