Page 1 of 1

remapping a GetKeyState() event

PostPosted: Sat Sep 06, 2008 4:33 pm
by smillz
Does anybody know a possible way to remap a key used in a GetKeyState event? for example:
Code: Select all
char*key = GetKeyState();
if(key[KEY_LEFT ] == 1)
{
    y -= 10;
}

if you just remap the left key, an event like the example in a script won't be remapped, you would still need to use the left key. Is ther a way to remap both? Help much appriciated. :wink:

Re: remapping a GetKeyState() event

PostPosted: Sat Sep 06, 2008 6:03 pm
by Spidy
check out DST Tempelate Demo i think there is a code there
viewtopic.php?f=6&t=5833

Re: remapping a GetKeyState() event

PostPosted: Sat Sep 06, 2008 7:40 pm
by smillz
no, i don't think it's there... :(

Re: remapping a GetKeyState() event

PostPosted: Sun Sep 07, 2008 2:20 pm
by DilloDude
You need to store the new keys in a variable when you change them, and instead of using KEY_LEFT, use your variable.

Re: remapping a GetKeyState() event

PostPosted: Sun Sep 07, 2008 10:06 pm
by smillz
DilloDude wrote:You need to store the new keys in a variable when you change them, and instead of using KEY_LEFT, use your variable.
I'ma try that :)