-
May 17th, 2018, 05:47 AM
#1
Keyboard input and TranslateMessage
As the doc (https://msdn.microsoft.com/pl-pl/lib...(v=vs.85).aspx) about the windows keyboard input says
Key strokes are converted into characters by the TranslateMessage function
My question is how doues the `TranslateMessage` function really works in the hood. How does it translate the key-down messages (`WM_KEYDOWN, WM_SYSKEYDOWN`) to character massage (`WM_CHAR, WM_SYSCHAR`)?
To clear up what i'm talking about here is the use case: when i set the keyboard layout to Polish when i press the `ALT key + a` i get the `ą` letter then when i change the layout to Turkey for e.g. a get the `æ` letter with different charcode then `ą` letter with Polish layout. How does the `TranslateMessage` utilize the current keyboard layout to produce differet charcodes for differet layouts? Does it use some kind of language tables/files/dlls to lookup the right charcode for selected layout?
-
May 27th, 2018, 02:03 AM
#2
Re: Keyboard input and TranslateMessage
Hardly you can find information here more than MSDN provides. Definitely keyboard driver, localization tables and Windows core are involved in keypress translation, but this sort of information looks like belonging strictly with Windows core development, thus kept unexposed. You might find some crumbs in blogs of Windows veterans, but this place is not of the kind.
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|