So, yeah, 0x41 is 'w', but why is this
GetAsyncKeyState(0x57)
working and this
GetAsyncKeyState('w')
is not working? By "not working", I mean that when I press 'w', it does not react at all as it does with 0x57. How can I fix it? What I want to do is read a character from a file, like 'w', and then use it in GetAsyncKeyState() function. Thanks in advance!
The ASCII code for 'w'
is 0x77
and the ASCII code for 'W'
is 0x57
. So
GetAsyncKeyState(0x57)
is the same as
GetAsyncKeyState('W')
which is different from
GetAsyncKeyState('w')
The official table of virtual key codes gives 0x57
as the code for the W key.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With