Re: A DirectInput problem

Alen Ladavac <[email protected]> Mon, 7 Jul 2008 12:59:58 +0200
Newsgroups gmane.games.devel.general
Organization Croteam
Message-ID <[email protected]>
Nope, works correctly for me (though I tested this on April 2006 SDK -
don't ask, that's what I had handy :) ). I'd say you should try with a
different keyboard, perhaps you have a ghosting problem in the
hardware.

On another note, I've never used DirectInput for keyboard or
mouse. IME, I've had more robust results and a simpler solution by
intercepting the keyboard/mouse events (WH_GETMESSAGE, WH_CALLWNDPROC
- both need to be checked at the same time) directly for keypresses
and GetCursorPos() for mouse position.

HTH,
Alen

Pierre wrote:

> (Posted here while I'm waiting for the DXML to confirm my subscription)

> Hi,

> I have a problem with DirectInput in the August 2007 SDK. A good repro case
> exists in the SDK's samples, just run:

> Microsoft DirectX SDK (August 
> 2007)\Samples\C++\DirectInput\Bin\x86\Keyboard.exe

> Create an exclusive, foreground, immediate device.

> Now, press W and D at the same time, as if you were moving forward/right in
> a game. Then, while still pressing W and D, press space for a jump. The key
> is correctly detected (Data 0x11 0x20 0x39).

> Now however, press S and D at the same time, to move backward/right (Data
> 0x1f 0x20). Then press space. The key is not detected, and player can't jump
> while moving backward/right (which is exactly how I found the issue).

> Do you see the same thing?
> Is that "normal" behaviour? (??)
> Any way to fix this?

> Thanks for any help....

> - Pierre 


> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> Gamedevlists-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
> Archives:
> http://sourceforge.net/mailarchive/forum.php?forum_id=557



-- 
Alen


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=557