Board index » delphi » two key command

two key command

Hello,
  I am looking for a code or a example or just anything to help me make two
keys equal one command. Please send this to me if you can thanks.
 

Re:two key command


Quote
slurp wrote in message ...
>Hello,
>  I am looking for a code or a example or just anything to help me make two
>keys equal one command. Please send this to me if you can thanks.

Maybe my brain cells haven't fired today but I'm having trouble
understanding
what you are trying to say. Please rephrase and expand.

KlausL

Re:two key command


Well, I'm writing a game for two players, and I need the game to detect all
the keys that are pressed on the keyboard on the same time, with the readkey
command I am able to read only the key that was pressed first.

e.g. : in all the arcade games you con hold a directional key (left) to move
and fire with another key (enter) without having to release the directional
key

I hope that this will help your brain cells, if not get help by an expert!
;)

Mezga0153

KlausL <Klaus@(!not$receiving!).nett> je v sporoilu novic
38a16...@news.internex.net.au napisal ...

Quote

> slurp wrote in message ...
> >Hello,
> >  I am looking for a code or a example or just anything to help me make
two
> >keys equal one command. Please send this to me if you can thanks.

> Maybe my brain cells haven't fired today but I'm having trouble
> understanding
> what you are trying to say. Please rephrase and expand.

> KlausL

Re:two key command


Quote
Mezga0153 wrote in message ...
>Well, I'm writing a game for two players, and I need the game to detect all
>the keys that are pressed on the keyboard on the same time, with the
readkey
>command I am able to read only the key that was pressed first.

>e.g. : in all the arcade games you con hold a directional key (left) to
move
>and fire with another key (enter) without having to release the directional
>key

>I hope that this will help your brain cells, if not get help by an expert!
>;)

>Mezga0153

>KlausL <Klaus@(!not$receiving!).nett> je v sporoilu novic
>38a16...@news.internex.net.au napisal ...

>> slurp wrote in message ...
>> >Hello,
>> >  I am looking for a code or a example or just anything to help me make
>two
>> >keys equal one command. Please send this to me if you can thanks.

I don't think the PC BIOS supports the sort of operation you have in mind.
I tried it with READKEY and found that pressing a new key without
releasing the previous key returns the new key value only (unless you
press one of the prefix keys such as shift, ctrl etc.).

If you're keen then you would probably need to monitor your keystrokes
at the BIOS level by intercepting interrupt $16 function $10.

KlausL.

Re:two key command


Quote
"KlausL" <NotReceiving@!invalid.add!> wrote:
>Mezga0153 wrote in message ...
>>Well, I'm writing a game for two players, and I need the game to detect all
>>the keys that are pressed on the keyboard on the same time, with the
>readkey
>>command I am able to read only the key that was pressed first.

>I don't think the PC BIOS supports the sort of operation you have in mind.

You're right. To do this you have to monitor all presses and releases of all
keys.

Quote

>If you're keen then you would probably need to monitor your keystrokes
>at the BIOS level by intercepting interrupt $16 function $10.

That function wont help much. Better process interrupt $15, function $4F.

Alexa

Re:two key command


Quote
Todorovic wrote in message ...
>You're right. To do this you have to monitor all presses and releases of
all
>keys.

>>If you're keen then you would probably need to monitor your keystrokes
>>at the BIOS level by intercepting interrupt $16 function $10.

>That function wont help much. Better process interrupt $15, function $4F.

>Alexa

Alexa,

I completely agree with you.

KlausL

Other Threads