I am using openCV in C++ on OSX and Ubuntu systems.
I would like an equivalent function of setMouseCallback
but for keyboard events (key pressed).
For what I have seen the way to do it in openCV is to use waitKey()
but actually it does not work as a callback because stops the normal flow waiting for the event specified.
The problem is that I am streaming a video from the webcam so this solution is no good for me.
Is there any proper function to set a callback for keyboard events as is possible for mouse events?