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 / reliable keypress checks

Author
Message
Mychal B
15
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 11th Jul 2011 02:01
Hello all,

While I was programming my menu to work off of keystates I started wondering "my keystate for enter is 28, but it isn't going to be like that for all computers, is it?" If I'm right, this isn't reliable enough for me. What would be a better way to check the keys that will be the same on the majority of computers?

I was able to use key up and keydown for directing, but the problem is in entering and exiting different parts of the menu.

Thanks all!
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 11th Jul 2011 02:27
99% of the time it's going to be the same KEYSTATE().



Mychal B
15
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 11th Jul 2011 02:48
Awesome, thanks a lot. I wasn't really sure if they changed much

Login to post a reply

Server time is: 2026-07-10 21:42:01
Your offset time is: 2026-07-10 21:42:01