Bezeichnung
CreateKeyDown -- create a new keydown object / VERALTET
Übersicht
CreateKeyDown(id,key$)
Beschreibung
Achtung: Dieser Befehl ist Teil der Hollywood 1.x Ereignisbibliothek. Sie sollten ihn nicht länger verwenden. Bitte benutzen Sie die Befehle der neuen Bibliothek ab Hollywood 2.0.

Use this command to declare a key to monitor. If the user presses this key, Hollywood will Gosub() to the label called ONKEYDOWN with the number as specified in this command.

Key$ is a string representing a key on your keyboard. This can be one of the following control keys:

UP
cursor up
DOWN
cursor down
RIGHT
cursor right
LEFT
cursor left
HELP
help key
DEL
delete key
BACKSPACE
backspace key
TAB
tab key
RETURN
return/enter key
ESC
escape
SPACE
space key
F1 - F10
function keys

The other keys can be accessed by just specifying the character of the key in the string, e.g. "A", "!" or "-".

The following keys cannot be monitored: Alt keys, command keys and the control key.

Eingaben
id
desired identifier for the button
key$
key to monitor
Beispiel
CreateKeydown(1,"ESC")
While(quit=FALSE)
   WaitEvent
Wend
End

Label(ONKEYDOWN1)
quit=TRUE
Return
The above code waits for the user to press the escape key. Then it quits. A code structure like above is recommended for your applications.

Navigation zeigen