Re: MapVirtualKeyEx



Guy Cohen <noemail@xxxxxxxxxx> schrieb im Beitrag
<OPKJ6s$NHHA.3668@xxxxxxxxxxxxxxxxxxxx>...
I am trying to figure out how to use MapVirtualKeyEx
I have this variable/structure:
Private kb_struct As KBDLLHOOKSTRUCT
I call the MapVirtualKeyEx like this:
MapVirtualKeyEx(kb_struct.scanCode, 2, GetKeyboardLayout(0))
But it does not return the ascii code of the character...
Please help.

Didn't read the docu, eh?

uMapType

0 uCode = virtual key code -> scan code
1 uCode = scan code -> virtual key code without L/R distinction
2 uCode = virtual key code -> unshifted character value
3 uCode = scan code -> virtual key code with L/R distinction

This means for you either
MapVirtualKeyEx(kb_struct.vkCode, 2, GetKeyboardLayout(0))
or
result = MapVirtualKeyEx(kb_struct.scanCode, 1, GetKeyboardLayout(0))
+
MapVirtualKeyEx(result, 2, GetKeyboardLayout(0))

--
----------------------------------------------------------------------
THORSTEN ALBERS Universität Freiburg
albers@
uni-freiburg.de
----------------------------------------------------------------------

.


Loading