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.

DarkBASIC Professional Discussion / multiple key presses help

Author
Message
Jacob G
13
Years of Service
User Offline
Joined: 12th Jul 2012
Location:
Posted: 13th Jul 2012 18:51
Hello everyone, im making a game and all i can notice is there is leftKey rightKey UpKey and DownKey, might be more but i havent came across them yet. Is there an easy way that i can get all the keys.

like f1, 1-9, all the letters, and home butten and that category.

Thanks

Jacob Gardam
RonsWare
15
Years of Service
User Offline
Joined: 5th Sep 2010
Location: Netherlands
Posted: 13th Jul 2012 23:40
Hello Jacob.

There is a very easy way to do this.

Use the scancode() command.

With this small program you can get the key codes.



After this you can put it in your program like this.
Use the Keystate( keycode )



Hope this helped.

Cheers Ron.

Programming is learning
Kezzla
17
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 14th Jul 2012 05:51
that or press control K in the dbpro editor, that brings up a keystate finder, just press the key you want, then press insert.

Sometimes I like to use words out of contents
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Jul 2012 16:57
I didn't know that. Thanks. How did you find out?
Kezzla
17
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 15th Jul 2012 03:12
no worries

I found it in the tools menu.

There's also a section to add your own editor plugins(I assume) but I've never been able to find information on where they are or how to make them.

there could be lots more little time savers like the keystate finder up for grabs somewhere out there...

Sometimes I like to use words out of contents
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 17th Jul 2012 00:19
Quote: "I found it in the tools menu."


I was fooled by the fact that it was cunningly hidden at the top of the menu.

Thanks.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th Jul 2012 02:15
Quote: "I found it in the tools menu."


Always looked at it and thought, I wonder what that does...

Login to post a reply

Server time is: 2026-07-08 12:26:41
Your offset time is: 2026-07-08 12:26:41