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!
:)
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!
:)
Afternoon, nyam.
ummmmm.....
The codes are different.
VK_LEFT = 25h
VK_NUMPAD4 = 64h
Dunno if it'd help, however you could always check VK_NUMLOCK as well.
Cheers,
Scronty
ummmmm.....
The codes are different.
VK_LEFT = 25h
VK_NUMPAD4 = 64h
Dunno if it'd help, however you could always check VK_NUMLOCK as well.
Cheers,
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!
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!
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.