   Direct Input keyboard problems
  I've made this work before in another project, and I don't think I'm doing anything differently this time, other than using VS2008 instead of VS2003 and multi instead of single thread.  When I GetDeviceState() for my system keyboard, I never get any key response in the key state buffer.  I can run my old project, and it works, but for some reason I can't here.  I aquire() right before the getDeviceState() and it's successful, so I don't know why I never get the correct polling.  I have a breakpoint right after GetDeviceState() if DIK_A is down (using the method pasted right from microsoft's sample) and I never hit it.  Does anyone have any ideas what the problem might be?   
  Have you double checked all of your DirectInput calls to make sure none of them are returning error codes?   ;Quote:Original post by TimptationDoes anyone have any ideas what the problem might be?Yes, you're using DirectInput for keyboard input. Don't do that. It's no better an idea than writing a keyboard driver to do it for you.   ;  Unfortunately(?) all my calls are returning status S_OK.  So I'm just really at a loss for why this would be.  As for using Win32... I suppose that's an option provided I take the time to learn it...  I was just hoping this would be easier to fix.   ;  I've figured out what it was BUT, could someone tell me why this is...  It seems (perhaps because I'm using VS2008 instead of VS2003?) the WM_PAINT message isn't being posted over and over like I'm used to.  I was polling for input there, so that's why it didn't work.   ;  According to the documentation, WM_PAINT may or may not be sent as you expect, depending on the circumstances. In any case, the only thing you should be using WM_PAINT for is to update your window's rendered contents. Relying on WM_PAINT to do input handling is not a great idea.In any case, getting away from DirectInput entirely is probably a wise choice, as Evil Steve already noted.   