function WaitKey()

Halts execution of a program until a key is pressed.