I'm using 'GetAsyncKeyState' to get input in my game.
But, It can't distinguish Left Arrow Key and Keypad 4 Key.
(Because GetAsyncKeyState accepts 'Virtual Key Code', But the virtual key codes of two is the same.)

How can I distinguish the two keys???
Any answer is welcome!

I'll not use DirectInput or WM_KEYDOWN message.
I had no problems with these.

I'm using only Win32 API.

Thank you for reading.
And, Have a nice day!
Posted on 2002-06-04 00:12:12 by nyam
Afternoon, nyam.

The codes are different.
VK_LEFT = 25h
VK_NUMPAD4 = 64h

Dunno if it'd help, however you could always check VK_NUMLOCK as well.

Posted on 2002-06-04 04:46:08 by Scronty
Thank you very much for replying Scronty!!! :)

But, I knew that VK_LEFT and VK_NUMPAD are different.

I want to distinguish two keys when NUMLOCK is off.

Any help is welcome!
Posted on 2002-06-04 19:05:10 by nyam
Back in the ol' DOS days, we had Keycodes ('A' = 0x41) and Scancodes (Unique to each key). You'll need the Win32 equivilent to int 0x16.
Posted on 2002-06-11 23:28:14 by eet_1024