Results 1 to 4 of 4
Hi all,
I need some help.
I want to get input from the keyboard and currently using a mirror of kbhit()/getch();
But it does not give me multiple key presses ...
- 12-10-2007 #1Just Joined!
- Join Date
- Dec 2007
- Posts
- 2
Simultaneous key input from keyboard in C++
Hi all,
I need some help.
I want to get input from the keyboard and currently using a mirror of kbhit()/getch();
But it does not give me multiple key presses at a single moment.
If I press 'a' and 'b' at the same time, I just get either 'a' or 'b' as the input.
I need them both at the same time, maybe intervened. The same is given by Asynckeystate() in windows.
Any thing similar to that in Linux??
Any help would be much appreciated
- 12-10-2007 #2
Not all keyboards can send at the EXACT same time.
Since keyboards arnt made for that.
You'll need a USB keyboard for sure to do that. And you'll need to be sure that the OSes Keyboard Buffer Supports DUAL-Keypresses.
This problem is the biggest problem of Emulated Gamers.
Sorry to tell you that.
Cheers,
Robin
- 12-15-2007 #3Just Joined!
- Join Date
- Dec 2007
- Posts
- 2
Thanks for the reply.
Now I want them to alternate one after the other. The same is supported by VC++ using the function mentioned above. When two keys are presses simult, it returns both the keys in sequence one after the other, till the keys remain pressed.
So cant the same be done on linux.
- 12-15-2007 #4
Take a look at this thread.
Hope this helps.--
Bill
Old age and treachery will overcome youth and skill.


Reply With Quote