QBasic 1.1: LIST Keyword
Explanation
KEY Statement (Assignment)
Assigns string values to function keys and, optionally, displays key values.
Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Syntax
KEY key%, stringexpression$ |
KEY LIST |
KEY ON |
KEY OFF |
Description / Parameter(s)
key% |
The number of a function key. Use 1 through 10 for function keys F1 through F10. Use 30 and 31 for function keys F11 and F12 on extended keyboards. |
stringexpression$ |
A string of up to 15 characters that is returned when the function key is pressed. |
LIST |
Displays the assignments for each key. |
ON |
Turns on the function-key display line. |
OFF |
Turns off the function-key display line. |
Example
KEY 4, "MENU" + CHR$ (13)
KEY LIST
KEY 4, ""
KEY LIST