I have a small WIN32 C-Application in which i work with the KBDLLHOOKSTRUCT
structure. This structure contains the VK-Code for a pressed key.
I try to convert this to an ASCII-Character. For this i use the Function MapVirtualKey
, which works well.
The only problem is, that one VK-Code can stay for multiple chars. Example:
On my keyboard (Swiss-German) exists the key-char .. If i press Shift+. then it creates a :
. The VK-Code is the same. Thats no problem, and i can also check if Shift is pressed or Caps Lock is activated.
My only problem is: How can i get the char ':'? I need a function like this:
GetKeyChar(vkCode, shift)
I need this to get the "normal" and the "shifted" value of the keyboard. Of course i could hardcode this, but i don't like to do it on this way.