I am trying to write a c++ program that responds to keyboard input. I want to run this as a daemon so I can't use cin, I would also like to output each character as it is pressed to a picoLCD screen that I have set up. What is the best way to do this?
+1
A:
If the application is running in the background as a daemon, you can use the common Windows approach of a "keyboard hook". This is performed much differently on Linux though and there are various methods you may want to look into.
It is discussed a bit in this SO question: http://stackoverflow.com/questions/144901/system-wide-keyboard-hook-on-x-under-linux
John T
2009-07-09 22:48:24
Thanks not exactly what I am looking for but got me on the right track
2009-07-09 23:17:34