   Blocking keys in directinput
  I'm writing a background application that needs to react to keys being held down. I've used two approaches (still compile-time switchable in my application via a #define), the first one was windows low level input hooks (WH_KEYBOARD_LL and WH_MOUSE_LL). The problem with that was that every time the mouse hook gets installed, the mouse would lag terribly for at least five seconds. Why, I don't know. So I switched to DirectInput. That solved the lag problem and its working beautifully, except for one thing. With windows hooks, I could effectively block a mouse click for all other applications by simply not calling CallNextHook. With DirectInput I don't know hos to do this. I really want to be able to do it since if the user configures the back button of his mouse to be my applications hotkey, I don't want his browser to navigate back every time he clicks it. Am I making any sense? Does anyone know how to do this with DirectInput? Thanks.   