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 Discussion / Key Input

Author
Message
Ole Sparky
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: United States
Posted: 22nd Dec 2002 10:53
Is there a command to check for keys besides Control, Escape, Left/Right/Up/Down Arrow, Return, Space, and Shift (i.e., W,A,S,D, etc...)???
-Ya know how much I hate 'Stack Overload Error's?-
Thhhhhhhhhhhiiiiiiiisssssssssssss muuuuuuuuccchhh!
xtom
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Ireland
Posted: 22nd Dec 2002 16:14
inkey$(), scancode() and keystate()

run this prog and press a key to get it's scancode number. keystate() uses the same numbers as scancode but allows you to check for multiple keypresses in the one loop. And with inkey$() you can have if inkey$()="a" then whatever

do
cls
print scancode()
loop


There's a diagram knocking about somewhere. Should really have been one in the manual too.
Ole Sparky
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: United States
Posted: 22nd Dec 2002 17:28
Ah, ok. Thanks for the info.

-Ya know how much I hate 'Stack Overload Error's?-
Thhhhhhhhhhhiiiiiiiisssssssssssss muuuuuuuuccchhh!
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 22nd Dec 2002 19:09
Use keystate()

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
cloud
21
Years of Service
User Offline
Joined: 27th Oct 2002
Location:
Posted: 24th Dec 2002 15:58
use this code to help :

if scancode()=# then ""
put a number after the =
here is the scancode code:



hope this helps

cloud
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 24th Dec 2002 16:10
You might be interested in my Function Mapper for a more advanced control system...

Good news everyone! I really am THAT good...
Oh my, yes...

Login to post a reply

Server time is: 2024-04-26 06:59:54
Your offset time is: 2024-04-26 06:59:54