Is there a way to convert from Qt::Keyto my own keyboard code (either a scan code or a virtual key code)?
QKeyEvent has two methods:
nativeScanCode () const
quint32 nativeVirtualKey () const
So, somewhere there must be a comparison between the native code and Qt:Key. I am looking for the inverse function -> Qt:Keynative code
According to “ How to convert native Windows virtual key code> to Qt :: Key? ” I expect the mapping to qt\src\gui\kernel\qkeymapper_win.cpp, but this file does not exist in my src path (Qt 5.2) .
- Edit (Samoth's answer) -
I can find the files now, a stupid mistake on my side. What I'm really looking for is a way
- either convert
Qt:Keyto native / virtual code - or vice versa
, .