Name
WaitKey -- wait for key press in the console (V11.0)
Synopsis
WaitKey()
Function
This function will wait for the user to press any key in the console. This can be useful when writing console-only programs and you just want to wait for a key press.

Note that this is a console function. It will only react on key presses that happen in the console. If you want to learn about key presses in Hollywood displays, you need to use functions like WaitKeyDown(), IsKeyDown() or event handlers like OnKeyDown instead.

Also note that of course the same thing can also achieved by using functions from the console library, but the console library isn't available on all platforms and also has a dependency on the (n)curses library on some platforms. WaitKey(), however, works on all platforms, except on Android and iOS of course.

Inputs
none


Show TOC