waitKey

Run the event loop for each present figure, and wait for key and/or given time.

int
waitKey
(
string unit = "msecs"
)
(
ulong count = 0
)

Parameters

unit

Unit in which time count is given. Same as core.time.Duration unit parameters.

count
Type: ulong

Number of unit ticks to wait for event loop to finish. If left at zero (default), runs indefinitelly.

Return Value

Type: int

Ascii value as int of keyboard press, or 0 if timer runs out.

Throws

ContextNotInitialized

Meta