Example of How to Use 1- and 2-Byte Return Codes from INKEY$ (45909)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System for MS-DOS 7.0
This article was previously published under Q45909 SUMMARY
The following information applies to QuickBasic Versions 3.00, 4.00,
4.00b, and 4.50, to Microsoft Basic Compiler Versions 6.00 and 6.00b,
and to Microsoft PDS Version 7.00. The Version 4.50 QuickBasic Advisor
and the Basic PDS 7.00 Microsoft Advisor on-line Help system state the
following:
The INKEY$ function returns a 1- or 2-byte string containing a
character read from the standard input device. A null string is
returned if no character is waiting there. A 1-character string
contains the actual character read from the keyboard, while a
2-character string indicates an extended code, the first character
of which is hexadecimal 00.
When two bytes are received from an extended key, the second character
of the string is the scan code associated with the extended key. The
chart in the Version 4.50 QuickBasic Advisor and Microsoft Advisor
on-line Help system for Basic PDS 7.00 contains the scan code listing.
The extended keys include the function keys, arrow keys, HOME, PGUP,
END, PGDN, and SHIFT+TAB keys.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB45909 |
---|
|