Solved wince6.0 Qt4.7 Keyboard key error
-
I come from China,
use English keyboard.
I think not use any special locale.just the key "s" has problem, All other keys are normal.
-
Let me summarize the problem:
1 wince system virtual keyboard no problem;
2 physical keyboard is normal when use in wince system
For example, I create a folder and then change the name of the folder,
3 The s key has the same function as BackSpace key
4 If I press and hold the s button, can enter the s character normallyonly The s key has this problem
-
@CraigTao Is the keyboard maybe broken?
Did you configure the correct keyboard layout? -
I replaced keyboard, the problem still exists.
I don't configure keyboard layout. only the s key.
and
"2 physical keyboard is normal when use in wince system
For example, I create a folder and then change the name of the folder,"so. I think maybe Qt internal problem?
which part of Qt source code is handle system key message?
-
As I already suggested, first test with Qt 4.8.7.
-
When I debugged, I found something interesting
Inherit from class QLineEdit to implement a LineEdit
void LineEdit::keyPressEvent( QKeyEvent* pEvent )
{
int val = pEvent->key();
QString = pEvent->text();
QLineEdit::keyPressEvent(pEvent);
}key s character is ‘s' , but the key value is same as BackSpace : 16777219
-
What locale are you using ?
And again, please test against the latest version of the Qt 4 series. -
@SGaist thank you so much.
I can't update Qt version to 4.8.Now use a method to solve this problem.
bool VirtualRunQt::eventFilter( QObject* pObject, QEvent* pEvent ) { if (pEvent->type() == QEvent::KeyPress) { QKeyEvent *ke = static_cast<QKeyEvent*>(pEvent); if (ke->text() == "s" && ke->key() == 16777219) { QKeyEventHelp* pKey = reinterpret_cast<QKeyEventHelp*>(ke); pKey->k = 83; } } return QObject::eventFilter(pObject, pEvent); } qApp->installEventFilter(this);
but I still think this is a bug in Qt4.73
-
@CraigTao said in wince6.0 Qt4.7 Keyboard key error:
I can't update Qt version to 4.8
It's just to test whether it is an issue with older Qt version you're using.
-
I will test when I am free, now so busy.
How do I set the post to be resolved?
-
@CraigTao Bottom right corner "Topic Tools"