How can I make it so if the user hits the arrow key that the program will see it as input in a console application? I am using the Dev C++ compiler.

12 Years
Discussion Span
Last Post by nanodano

I think you'll probably have to check out the Windows API (if you are using Windows) for that. Check out http://msdn.microsoft.com there's a lot of good information on there assuming you can find what you are looking for.

If you are on UNIX/Linux you can get that from the X11 libraries. I can't remember exactly what the code looks like, but X11 will poll the keyboard and return an event anytime a key is pressed. There are some resources out on the web for more info.

Hope that helps.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.