First time here? Check out the FAQ!
answered 2013-04-05 05:05:32 -0600
use cvWaitKey function:
cvNamedWindow("window") for(;;) { char key = (char) cvWaitKey(10); if (key == 27 /*escape*/) break; }