key combo

Mar 19, 2012 at 5:49pm
So far I've been using this way to detect key strokes:
1
2
#include <conio.h>
int keyboard_key() {if (kbhit()) {return getch;} else {return 0;} }

But the problem is that I can detect only 1 key per 1 key stroke.
That I don't want.

I want to be able to get whether a certain key was pressed
not what key was last pressed.

This of course is not working:
1
2
int keyboard_check(int key) 
{if (keyboard_key()==key) {return 1;} else {return 0;}}

Ideas?

btw, nice new theme
Last edited on Mar 19, 2012 at 5:50pm
Mar 19, 2012 at 6:12pm
use a library like SFML
Topic archived. No new replies allowed.