I have Microsoft Quick BASIC 4.5 running on a DOS 5.0 computer.
I have been able to PEEK
the memory to see when special keyboard keys like Num Lock, Caps Lock, Insert, and others are pressed:
DEF SEG = 0
x = PEEK(&H418)
Print x
When I print x
I get the following values for the following keys:
Right Shift = 1
Left Shift = 2
Ctrl = 4
Alt = 8
Scroll Lock = 16
Num Lock = 32
Caps Lock = 64
Insert = 128
But what memory segment (DEF SEG
) and memory address PEEK
(?) do I use to "see" when the A key, or B key, or number key, or any other key is pressed?
I'm not sure there is a location to check for those keys. You might be able to use inkey$ for that. Together with Peek($h418) you should be able to get the current keypresses.