Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualMick is Stumped

Posted 20 October 2012 - 11:54 PM

^Hi, actually that's not my code. But if you do the experiment you will find that the condition in it is never false. I think the comment is just announcing the expected behavior. I could be wrong but the down events also appear to repeat. Which seems really counter to how DirectInput should work as there is nothing "direct" about translated input.

It seems like the person (lets give MS the benefit of doubt) who programmed the buffered side of the system keyboard device was just a world class twit and MS in its supreme irresponsibility never fixed it.

At any rate I describe a fix here (http://xboxforums.cr...s/t/108722.aspx) that basically just fills a buffer with the downed keys and calls GetAsyncKeyState until the key is lifted. In theory a down event could get timestamped before a previous up event (especially with the repeating behavior; though you could overwrite the timestamps too) but other than that its not so awful for buffered keyboard input. And its the only non-trivial specialization I had to do with for a system that exposes controllers as completely abstract beasts. In theory I could finish Super Mario Bros. with the nobs and mute button on a little speaker I have that for some reason shows up as a Direct Input controller. It was really annoying having to setup a DIK to VK translation table though.

If you are implementing input handlers on a subsystem basis you really don't have to pick a subsystem. It's probably the best that can be done for Direct Input and probably should work without a hitch if the buffer readback loop is of sufficient resolution. In other words there are plans to offer end users more than one keyboard option in my case.

#4Mick is Stumped

Posted 20 October 2012 - 11:53 PM

^Hi, actually that's not my code. But if you do the experiment you will find that the condition in it is never false. I think the comment is just announcing the expected behavior. I could be wrong but the down events also appear to repeat. Which seems really counter to how DirectInput should work as there is nothing "direct" about translated input.

It seems like the person (lets give MS the benefit of doubt) who programmed the buffered side of the system keyboard device was just a world class twit and MS in its supreme irresponsibility never fixed it.

At any rate I describe a fix here (http://xboxforums.cr...s/t/108722.aspx) that basically just fills a buffer with the downed keys and calls GetAsyncKeyState until the key is lifted. In theory a down event could get timestamped before a previous up event (especially with the repeating behavior; though you could overwrite the timestamps too) but other than that its not so awful for buffered keyboard input. And its the only non-trivial specialization I had to do with for a system that exposes controllers as completely abstract beasts. In theory I could finish Super Mario Bros. with the nobs and mute button on a little speaker I have that for some reason shows up as a Direct Input controller. It was really annoying having to setup a DIK to VK translation table though.

If you are implementing input handlers on a subsystem basis you really don't have to pick a subsystem. It's probably the best that can be done for Direct Input and probably should work without a hitch if the buffer readback loop is of sufficient resolution.

#3Mick is Stumped

Posted 20 October 2012 - 11:52 PM

^Hi, actually that's not my code. But if you do the experiment you will find that the condition in it is never false. I think the comment is just announcing the expected behavior. I could be wrong but the down events also appear to repeat. Which seems really counter to how DirectInput should work as there is nothing "direct" about translated input.

It seems like the person (lets give MS the benefit of doubt) who programmed the buffered side of the system keyboard device was just a world class twit and MS in its supreme irresponsibility never fixed it.

At any rate I describe a fix here (http://xboxforums.cr...s/t/108722.aspx) that basically just fills a buffer with the downed keys and calls GetAsyncKeyState until the key is lifted. In theory a down event could get timestamped before a previous up event (especially with the repeating behavior) but other than that its not so awful for buffered keyboard input. And its the only non-trivial specialization I had to do with for a system that exposes controllers as completely abstract beasts. In theory I could finish Super Mario Bros. with the nobs and mute button on a little speaker I have that for some reason shows up as a Direct Input controller. It was really annoying having to setup a DIK to VK translation table though.

If you are implementing input handlers on a subsystem basis you really don't have to pick a subsystem. It's probably the best that can be done for Direct Input and probably should work without a hitch if the buffer readback loop is of sufficient resolution.

#2Mick is Stumped

Posted 20 October 2012 - 11:51 PM

^Hi, actually that's not my code. But if you do the experiment you will find that the condition in it is never false. I think the comment is just announcing the expected behavior. I could be wrong but the down events also appear to repeat. Which seems really counter to how DirectInput should work as there is nothing "direct" about translated input.

It seems like the person (lets give MS the benefit of doubt) who programmed the buffered side of the system keyboard device was just a world class twit and MS in its supreme irresponsibility never fixed it.

At any rate I describe a fix here (http://xboxforums.cr...s/t/108722.aspx) that basically just fills a buffer with the downed keys and calls GetAsyncKeyState until the key is lifted. In theory a down event could get timestamped before a successive up event (especially with the repeating behavior) but other than that its not so awful for buffered keyboard input. And its the only non-trivial specialization I had to do with for a system that exposes controllers as completely abstract beasts. In theory I could finish Super Mario Bros. with the nobs and mute button on a little speaker I have that for some reason shows up as a Direct Input controller. It was really annoying having to setup a DIK to VK translation table though.

If you are implementing input handlers on a subsystem basis you really don't have to pick a subsystem. It's probably the best that can be done for Direct Input and probably should work without a hitch if the buffer readback loop is of sufficient resolution.

#1Mick is Stumped

Posted 20 October 2012 - 11:47 PM

^Hi, actually that's not my code. But if you do the experiment you will find that the condition in it is never false. I think the comment is just announcing the expected behavior. I could be wrong but the down events also appear to repeat. Which seems really counter to how DirectInput should work as there is nothing "direct" about translated input.

It seems like the person (lets give MS the benefit of doubt) who programmed the buffered side of the system keyboard device was just a world class twit and MS in its supreme irresponsibility never fixed it.

At any rate I describe a fix here (http://xboxforums.create.msdn.com/forums/t/108722.aspx) that basically just fills a buffer with the downed keys and calls GetAsyncKeyState until the key is lifted. In theory a down event could get timestamped before a successive up event (especially with the repeating behavior) but other than that its not so awful for buffered keyboard input.

If you are implementing input handlers on a subsystem basis you really don't have to pick a subsystem. It's probably the best that can be done for Direct Input and probably should work without a hitch if the buffer readback loop is of sufficient resolution.

PARTNERS