Hi ,
I am using Qt 4.5.0 in MSVisual Studio 2005.I need a scancode for all the keyboard keys and I used the following Qt events in my application to collect the scancodes for all the keys.
code A:
bool event(QEvent *event)// event handler
{
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
codevalue = keyEvent->nativeScanCode();
qDebug()<<"The scancode is "<<codevalue<<endl; //to print the scancode to the console.
}
Code B:
void keyPressEvent(QKeyEvent * keyEvent)
{
codevalue = keyEvent->nativeScanCode();
qDebug()<<"scancode is "<<codevalue<<endl;
}
In windows,using these functions I got the scancodes for all the keys except PrintScreen key. Please help me how do I get the Scancode for PrintScreen key in Windows.
Note:: In linux PrintScreen key has scancode integer value of 111.
Thanks in advance,
Hanumanth..
Bookmarks