Detecting multiple keypress(es) in C

S

Saurabh Jain

Hello,

I am writing a game in C and for making it a 2 player game, I need to
detect 2 or more keys getting pressed simultaneouly from the keyboard.

My knowledge of C / C++ is pretty intermediate and I would appreciate
any help.

Thanks in advance.

Regards,
Saurabh Jain
 
J

Joona I Palaste

Saurabh Jain said:
I am writing a game in C and for making it a 2 player game, I need to
detect 2 or more keys getting pressed simultaneouly from the keyboard.
My knowledge of C / C++ is pretty intermediate and I would appreciate
any help.

This can't be done in ISO standard C or ISO standard C++, as neither
language specifies any way to read anything from the keyboard. You
should ask in a newsgroup dedicated to your own implementation.
 
K

Karthik Kumar

Saurabh said:
Hello,

I am writing a game in C and for making it a 2 player game, I need to
detect 2 or more keys getting pressed simultaneouly from the keyboard.

My knowledge of C / C++ is pretty intermediate and I would appreciate
any help.

Thanks in advance.

Regards,
Saurabh Jain
This is more specific to the windowing toolkit that you are using
instead of C/C++ .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,146
Messages
2,570,832
Members
47,374
Latest member
anuragag27

Latest Threads

Top