1 | initial version |
Well, you can take a look at cv::waitKey
It will wait for a key during a delay amount of time (that you pass as a parameter) and will return an int value representing the key that has been pressed or an error value if no key was pressed.
It is quite basic, but it fulfills its purpose. Depending on what your purpose is you might need something more advance other than what OpenCV provides on this subject.