How to POKE Keystrokes Such as F3 (Last Command) into Keyboard (66744)
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
- Microsoft Basic Professional Development System for MS-DOS 7.1
This article was previously published under Q66744 SUMMARY
Instead of using CALL INTERRUPT to push keystrokes into the keyboard
buffer, the code example below POKEs a key directly into the keyboard
buffer area in memory under MS-DOS.
This information applies to QuickBasic versions 3.0, 4.0, 4.0b, and
4.5 for MS-DOS; to Microsoft Basic Compiler versions 6.0 and 6.0b for
MS-DOS; and to Microsoft Basic Professional Development System (PDS)
versions 7.0 and 7.1 for MS-DOS.
REFERENCES
For more articles about reading from and writing to the keyboard
buffer, search in this Knowledge Base for the following words:
interrupt and keyboard and buffer
The addresses for the keyboard buffer area, head, and tail (used in
the above code example) are documented in "The New Peter Norton
Programmer's Guide to the IBM PC & PS/2" by Peter Norton and Richard
Wilton, published by Microsoft Press (1988).
Keyboard scan codes are documented in Appendix D of "Microsoft
QuickBasic 4.5: Programming in Basic"; in Appendix A of "Microsoft
QuickBasic 4.0: Language Reference" for 4.0 and 4.0b; in Appendix A of
"Microsoft Basic Compiler 6.0: Language Reference" for 6.0 and 6.0b;
and in Appendix A of "Microsoft Basic 7.0: Language Reference" manual
for Basic PDS versions 7.0 and 7.1.
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB66744 |
---|
|