key toggles

use cvwaitkey instead of waitkey