Track key presses in C or C++
I'm looking for a simple way to run something on a unix machine and track when a specific key is pressed. So when someone hits a key on their keyboard, it fires some sort of event.
I am not a c/c++ dev so if someo开发者_运维百科ne could point me in the right direction. Running OSX
Any GUI toolkit will provide an event loop that deals with keyboard and other events.
Don't build one yourself if you aren't a pro.
精彩评论