05-04-2002, 08:33 PM
Ok so here goes...
You know that INKEY$ can only hold 1 value, the current key being pressed. MULTIKEY is used to get all the keys being pressed at that moment. First you will need to download the file ->
You must then start QBASIC with the QB quicklibrary (/l parameter) because it uses call absoulute.
This is an improved version of MULTIKEY by Milo Sedlacek, modified by Joe Huber
The file is actually a game that uses multikey, and explains MULTIKEY as a comment at the top of the file.
To use MULTIKEY, you will have to copy the 2 subs (included in the MULTIKEY file) into your programme (or 'program' if you live in the US). You are then ready to use multikey. (Instead of copying the subs, you might want to compile them into a single library and just include that instead.)
I will not explain how to use MULTIKEY and KEYTEST here, because all is explained in the .bas file.
It is very similar to INKEY$ for example rather than:
IF INKEY$ = CHR$(27) THEN...
you would use
IF MULTIKEY(1) THEN...
[MULTIKEY(1) = CHR$(27) = escape]
-------------------
hope this helps,
meritmonster :-D
You know that INKEY$ can only hold 1 value, the current key being pressed. MULTIKEY is used to get all the keys being pressed at that moment. First you will need to download the file ->
You must then start QBASIC with the QB quicklibrary (/l parameter) because it uses call absoulute.
This is an improved version of MULTIKEY by Milo Sedlacek, modified by Joe Huber
The file is actually a game that uses multikey, and explains MULTIKEY as a comment at the top of the file.
To use MULTIKEY, you will have to copy the 2 subs (included in the MULTIKEY file) into your programme (or 'program' if you live in the US). You are then ready to use multikey. (Instead of copying the subs, you might want to compile them into a single library and just include that instead.)
I will not explain how to use MULTIKEY and KEYTEST here, because all is explained in the .bas file.
It is very similar to INKEY$ for example rather than:
IF INKEY$ = CHR$(27) THEN...
you would use
IF MULTIKEY(1) THEN...
[MULTIKEY(1) = CHR$(27) = escape]
-------------------
hope this helps,
meritmonster :-D