that is why i said "the closest you can get..."
Inkey$, Input, and Input$(x) are all processed comands...
Meaning They go through Dos / Windows and Qbasic to process the output to return characters and formated data...
INP(96) reads the keyboard port directly (or very close to that)
Windows / Dos might have a hand in routing you to and from the port, but the data is unprocessed, and is rerturned MUCH faster...
However, you must then process it your self...
On the upside, It will unlock the ability to alow Multi-Key programs and know if a Key is Pressed, Held Down, and Released...
If you Want your program to pause or loop until you press a key, you can do this...
K = INP(96) 'read the current Key Status
Do
'optional code here
LOOP UNTIL INP(96) <> K 'Loop until the status changes...
The more traditional way is to use Input$(1) or Inkey$
This will Freeze your program until you press 1 key
A$ = Input$(1)
Which, is fine, if you don't want anything to happen while the program is waiting you input...
This will also Loop until a key is Pressed...
Do
'optional code here
Loop Until Inkey$<>""
This is OK, and I used this method for years, but now I have a 2GHz processor, and after 5 seconds of looping with no input, the program speed slows down by approx 50% (until I move the Mouse or something) which is
NOT A GOOD THING. So the solution resulted in using INP(96) to read the KB Port so you don't have to wait for QB to process the Inkey$ command (or whatever it does to slam your program speed)...
If you can't find help on INP(96) aka INP(&h60), let me know and I will provide detailed information and a few Tips to increase it's usability and improve it's performance...
Good Luck,
J S
Have Fun, Be Young... Code BASIC
-Josh