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 / KeyState List??

Author
Message
Goply
16
Years of Service
User Offline
Joined: 16th Jan 2008
Location:
Posted: 17th Jan 2008 05:35
"The main command that is used here is dbKeyState ( int iKey ). What this does here is check if the key is currently depressed and return true if it is, or false if it is not. The parameter than dbKeyState() accepts is a scancode rather than an ASCII value."

Example Code:
if ( dbRightKey() || dbKeyState( 32 ) == 1 )
{
dbYRotateCamera ( 0 , dbCameraAngleY( 0 ) + 90 );
dbMoveCamera ( 0 , PLAYERSPEED );
dbYRotateCamera ( 0 , dbCameraAngleY( 0 ) -90 );
}


Every time I goto mess around with stuff I want to assign and key and get stuck I have been surfing the web for a bit and can't find a list, or anywhere in the folder, I'm not having any luck with this can someone out there help me out? Could someone paste a KeyState list showing which # is assigned to which key, or a link to a site showing them.
Or even how to go about finding out for myself would be great.

Would help alot Thanks
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 17th Jan 2008 08:17 Edited at: 17th Jan 2008 08:20
found this on another thread:



you can add 183 for PrintScreen and 197 for Pause (on my keyboard anyway)/

Virtual Nomad
AMD XP 1800+ (~1.6 Ghz) / 1.5 GB RAM
ATI Radeon 8700LE 128 MB / Windows XP
Goply
16
Years of Service
User Offline
Joined: 16th Jan 2008
Location:
Posted: 17th Jan 2008 21:11
Thanks that helps a lot, now I can get somewhere
Foz
16
Years of Service
User Offline
Joined: 18th Dec 2007
Location: California
Posted: 27th Feb 2008 20:10
would the above map work on all standard PC boards, or just 'most'?...


Foz, I am.
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 27th Feb 2008 20:22
Quote: "would the above map work on all standard PC boards, or just 'most'?..."

I believe so but it is a map of the keys, not characters.

Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 27th Feb 2008 20:27
you could just use the scan code function to grab what key is being pressed - print it to screen or you could even make a craaazy setup screen for each player:
1. please press the key you would like to use for jumping.
> user input

thankyou.
2. to jump, press (what user inputted)

idea or not?

Paul
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 27th Feb 2008 22:33
Paul08 - good idea - KeyMapping! Note you need to write code so it only checks the mapped keys - not check all of them - use an array for this only as long as the keys you're checking otherwise it will dog.

I learned hard Way

thelackey
16
Years of Service
User Offline
Joined: 2nd Mar 2008
Location:
Posted: 2nd Mar 2008 20:13
DGDK is DirectX based, so under the hood it probably just uses the DirectInput DIK_ #define constants in dinput.h. You can open the file directly and search for "DirectInput keyboard scan codes" (w/o quotes) or find them in the SDK documentation (DirectX Input/DirectInput/Reference/Device Constants/Keyboard Device Constants).
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Mar 2008 21:21

Login to post a reply

Server time is: 2024-11-20 03:31:45
Your offset time is: 2024-11-20 03:31:45