waitKey()

Suspend program execution and wait for given key pressure. If no keycode is passed, it wait for any key.

Syntax:
waitKey( keycode )
waitKey

Example:
prints("press any key to contunue.")
waitKey
prints("press ESC key to exit.")
waitKey( k_esc )