looking for a library for accessing the keyboards functions, key states, etc. the language I'm planning on using is C++
+1
A:
There is no such possibility in C++ standard. It depends on platform you are going to support. The only portable way is to use portable library.
You could try Qt library, which is good looking and pretty convenient. For console application you could try ncurses.
Kirill V. Lyadvinsky
2009-09-16 04:22:32
PDCurses works on win32 and X11 (see http://en.wikipedia.org/wiki/Curses_%28programming_library%29)
Tobias Langner
2009-09-16 04:39:21
A:
If you are using Windows than you'll be using various window messages like WM_KEYDOWN
, WM_KEYUP
, WM_SYSCOMMAND
. Between those you should be able to whatever you need to do.
Igor Zevaka
2009-09-16 04:28:38
A:
Try SDL: http://www.libsdl.org. It's cross-platform, and you don't have to use the graphics portion of the library if you don't need it. Also, it gives you access to joysticks, if you want to have some fun ;)
Matt Fichman
2009-09-16 06:07:16
Look at the tutorial here: http://gpwiki.org/index.php/SDL:Tutorials:Keyboard_Input_using_an_Event_Loop
Matt Fichman
2009-09-17 15:48:40