Is there a cv2 function (in python) where I can update the display as cv2.waitKey(1) does, but without capturing keys?
waitKey(1) doesn’t work for me as it doesn’t capture special keys as it returns 0 for most, and -1 for shift, etc. As a result I’m capturing those with the keyboard module function hook.
This hybrid solution has the problem that cv2.waitKey() still captures key events that happen during its redraw and thus they’re lost to the keyboard.hook.
Seems as the solution is to do one of these:
- Force cv2 to update its windows without calling waitKey()? Eg – what function does waitKey() call?
- How to get waitKey() to not capture keys?
- How to get waitKey() to return a useful scancode for special keys (recall it returns 0 and ignores shift like keys)
Thank you.