win32 Window message mapping
I'm interested in how exactly Qt generates
QEventinstances - specifically, how does
QKeyEventget created on Windows OS? Does it use win32 API and maps
WM_CHARmessages? If so, how does it work since Qt has only 1 event but Windows creates
WM_CHAR(if it's one of those characters that gets translated by TranslateMessage function)? How does
QKeyEvent::text()return a proper character/string, is there a source code that I can analyze? Many thanks in advance.
@brkonator Not sure anybody can give you exact answer, but since Qt is open source you could check the source code.
"is there a source code that I can analyze?" - yes, checkout git://code.qt.io/qt/qt5.git as shown here: https://wiki.qt.io/Building_Qt_5_from_Git
You can for example search for WM_KEYDOWN in the source tree to quickly find the place where it is used.
This post is deleted!
@jsulm Thanks, I usually use a web interface to search through the source code but I couldn't find anything. It's much easier in the downloaded sources. I think qindowskeymapper.cpp is the file I was looking for. If anybody has a deeper insight into this though, I'm happy to hear some opinions.
SimonSchroeder last edited by
I don't have any clue about Qt's internals and I couldn't find it right away. However, I believe that you should be looking inside one of these files: https://code.woboq.org/qt5/qtbase/src/corelib/kernel/