Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert a Windows native virtual key code to Qt::Key?

I am working on a program which communicates with a windows native program, so it needs the actucal native virtual key code. How to convert from a Windows native virtual key code to Qt::Key?

like image 701
jay Avatar asked Sep 20 '11 08:09

jay


2 Answers

Look in the file qt\src\gui\kernel\qkeymapper_win.cpp

like image 183
sat4ripe Avatar answered Nov 15 '22 16:11

sat4ripe


If you have access to a QKeyEvent, key() and nativeVirtualKey may help.

From Assistant, qthelp://com.trolltech.qt.472/qdoc/qkeyevent.html#details

like image 20
Michael Simpson Avatar answered Nov 15 '22 18:11

Michael Simpson