Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / what r the key numbers for dbKeyState

Author
Message
wtfmanwtfman
14
Years of Service
User Offline
Joined: 29th Dec 2009
Location:
Posted: 29th Dec 2009 18:34
i basicly just need a chart that showes all the different keys and what number they equal for my game if some one could do that it would be great thanks (:
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 29th Dec 2009 18:58
first include dinput.h ( #include "dinput.h" ), then you can use it like :


dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 29th Dec 2009 18:58 Edited at: 29th Dec 2009 18:58
#include "dinput.h"

Then witness the magic that occurs when you write identifiers such as DIK_W, DIK_F1 etc!

[edit] Damnit, beaten by 5 secs.

wtfmanwtfman
14
Years of Service
User Offline
Joined: 29th Dec 2009
Location:
Posted: 29th Dec 2009 19:07
i did that but i get this error
error C2065: 'DIK_A' : undeclared identifier
hear is what im doing
if ( dbKeyState ( DIK_A ) )
{
dbSprite(6,23,50,6);
}
Marsh0
15
Years of Service
User Offline
Joined: 18th Mar 2009
Location:
Posted: 29th Dec 2009 19:10
If you dont want a extra include

wtfmanwtfman
14
Years of Service
User Offline
Joined: 29th Dec 2009
Location:
Posted: 29th Dec 2009 20:43
thaks marsh0 u healped me alot with that chart (oveiosly it worked)
now i can use other keys XD
fedekun
14
Years of Service
User Offline
Joined: 28th Dec 2009
Location: Argentina
Posted: 30th Dec 2009 01:54
nice image, thanks
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 31st Dec 2009 05:58
Yeah, it's a horrible idea to use the numbers in your code. Believe me, if you do anything serious with it, you'll come back to the code a week later and be like, "what the heck is going on here?"

Marsh0
15
Years of Service
User Offline
Joined: 18th Mar 2009
Location:
Posted: 31st Dec 2009 07:22
Quote: "Yeah, it's a horrible idea to use the numbers in your code. Believe me, if you do anything serious with it, you'll come back to the code a week later and be like, "what the heck is going on here?""


I find commenting the code helps.
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 31st Dec 2009 07:46
Or just use the macros in dinput.h as I said, that way your code will be self-documenting, as it should be.

Login to post a reply

Server time is: 2024-10-01 20:17:03
Your offset time is: 2024-10-01 20:17:03