GETKEYWAIT - get a key within a time limit
CH = GETKEYWAIT(P) waits for a keypress for a maximum of P seconds. P should be a positive number. CH is a double representing the key pressed key as an ascii number, including backspace (8), space (32), enter (13), etc. If a non-ascii key (Ctrl, Alt, etc.) is pressed, CH will be NaN.
If no key is pressed within P seconds, -1 is returned, and if something went wrong during excution 0 is returned.
See also input,
getkey, stoploop, yesno (FileExchange)