Ask Your Question

Revision history [back]

You will need to

  1. Simulate a key being pressed, which is C/C++, not OpenCV: http://stackoverflow.com/questions/5607849/how-to-simulate-a-key-press-in-c
  2. And do this inside a loop that is monitoring your mouse events, have a look at the opencv_annotation code for example: https://github.com/opencv/opencv/blob/master/apps/annotation/opencv_annotation.cpp