Advance Keyboard & ASCII controls

May 31, 2016 at 7:19am
Hey guys,

I've recently come back to another try at writing my text game for windows. I've gotten rather complex with inputting keystrokes from the keyboard. The only thing I've found to actually take in a single keystroke and moving on is the non-standard getche().

I'm looking for more complex command like clearing out it's little buffer, and figuring out how to use more than just the single byte key board commands. For example the up arrows from keyboards spit out two characters, you capture the first one, test it and then grab the second one to figure out which arrow key was used. Although, these arrow keys change in value from one keyboard to another based on the hardware controller.

Can anyone point me to documents on how getch() actually functions so I can rewrite it.

Secondly, any help on finding documents on keyboard key sets and detections of all features a keyboard has, for example the volume up/down and extended F-Keys (like F13).

Thank you in advance.
May 31, 2016 at 12:22pm
Jun 1, 2016 at 8:30am
Yes,

Therefore, instead of the outdated getche(), use the _getch(). I've swapped it out, but the bugs are still there.

The link is very good, I'll be playing with the code snippet it presents.

I'll keep hammering away trying to fix these bugs, (it looks like some part of my code is just overwriting parts of different arrays where ever it feels like it.)

Thank you.
Topic archived. No new replies allowed.