state[, k$] = IsKeyDown(key$[, rawkey])
key$ is currently pressed.
If it is, this function will return True otherwise it will return
False.
key$ is a string representing a key on your keyboard. This can be one
of the following control keys:
Alternatively, key$ can also be a character from the English alphabet,
e.g. "A", or a string containing a number from 0 to 9. Note that IsKeyDown()
doesn't support Unicode keys.
Starting with Hollywood 4.0, you can check the status of the modifier
keys, too. The following modifier keys can be checked using IsKeyDown():
Starting with Hollywood 6.1 you can pass the special string ANY
in key$ to check for an arbitrary key to be pressed. Starting
with Hollywood 11.0, IsKeyDown() will then return the key that
is pressed to you.
Starting with Hollywood 7.1 there is an optional argument rawkey.
If this argument is set to True, IsKeyDown() will treat key$ as a
raw key and check if it is down. In that case, key$ must be one
of the raw keys defined by Hollywood. See Raw keys for details.
The difference between normal keys and raw keys is described in
the documentation of the OnRawKeyDown event handler.
See InstallEventHandler for details.
True if key$ is a raw key (defaults to False) (V7.1)True if key$ is pressed, False otherwiseANY in key$ (V11.0)
Print("Press F1 please.")
Repeat
VWait
Until IsKeyDown("F1") = True
The above code waits until the F1 key is pressed.
(you can have that easier by using WaitKeyDown(); the one
above is only useful if you want to do something while the key
is not pressed)