Board index » delphi » Keyboard Buffer Help

Keyboard Buffer Help

Hello
I'm doing a game like Nibbles and when testing, I was confronted with the
Keyboard Buffer because the players may sleep the fingers on some keys
forming a Large Keyb Buffer. The Function Readkey read this buffer and
starts reading all the buffer by sequence , meanwhile the users are
pressing  keys and they don't work, (works later).
I tried to Clean The Keyb Buffer with this line:
        while keypress do readkey;
but then the keyboard din't work because it was always cleaning the Keyb
buffer
Can you tell me how to Reduce the keyb Buffer or something else to resolve
my problem. Post or Email
Thanks for reading my post.

--
Rui Vilela
RuiVil...@mail.telepac.pt
http://www.terravista.pt/bilene/1776
18326706

 

Re:Keyboard Buffer Help


In article <01bde027$bc56e680$LocalHost@mop12971>,

Quote
Rui Vilela <RuiVil...@mail.telepac.pt> wrote:
>Hello
>I'm doing a game like Nibbles and when testing, I was confronted with the
>Keyboard Buffer because the players may sleep the fingers on some keys
>forming a Large Keyb Buffer. The Function Readkey read this buffer and
>starts reading all the buffer by sequence , meanwhile the users are
>pressing  keys and they don't work, (works later).
>I tried to Clean The Keyb Buffer with this line:
>    while keypress do readkey;
>but then the keyboard din't work because it was always cleaning the Keyb
>buffer
>Can you tell me how to Reduce the keyb Buffer or something else to resolve
>my problem. Post or Email

First read the key you are interested in and after that clear the buffer.

Osmo

Other Threads