Results 1 to 4 of 4

Thread: Keyboard input, more then 6 keys?

  1. #1

    Thread Starter
    Fanatic Member twanvl's Avatar
    Join Date
    Dec 2001
    Posts
    771

    Keyboard input, more then 6 keys?

    I have made a simple two player game, that uses the GetAsyncKeyState API to get keyboard input.
    But when more then 6 keys are pressed simultaneously, the speaker beeps, and the program freezes for half a second.

    Also, when UP, LEFT, R and G are pressed only R orG are detected (I use RDFG for player 2 controls)

    This seems to apply not only in my game, is it a limitation/bug of Windows?
    Does anyone know what to do about this?

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Oregon
    Posts
    962
    I do not know, but I have noticed the same thing in the past.
    Involved in: Sentience

  3. #3
    Zaei
    Guest
    It is actually a limitation of your keyboard. It is only possible to press a small number of keys at one time before it stops working. It is the same for all operating systems (as far as I know).

    Z.

  4. #4
    Crunchy Cat
    Guest
    Hi, it sounds like your KB buffer may be full. I am not exactly
    sure how to correct that (assuming it can be corrected) without
    re-writing the KB driver; however, as far as detecting which
    keys are depressed and such, you may have better results
    by implementing a WH_GETMESSAGE hook and keeping track
    of key states yourself rather than relying on the API to do it.

    -CC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width