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?
Asked
Active
Viewed 961 times
2 Answers
3
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: system wide keyboard hook on X under linux
-
Thanks not exactly what I am looking for but got me on the right track – Jul 09 '09 at 23:17