I'm currently trying to figure out how to properly use Raw Input and I'm just a bit confused. Well, previously I worked with DirectInput, but its deprecated and Microsoft advises not to use this one for mouse and keyboard. So thats why I'm switching to Raw Input.
I want to implement the same approach used in XNA
KeyboardState keyState = Keyboard.GetState();
if (keyState.IsKeyDown(Keys.Q))
{
//do something on keydown
}
MouseState mouseState = Mouse.GetState();
if (mouseState.LeftButton == ButtonState.Pressed)
{
//do something on left mouse button pressed
//you can get coordinates of the mouse as mouseState.X and mouseState.Y
}
Is there any way to implement the same concept with Raw Input? And how would I implement that?Link, search suggestion or a book name will be more than enough.
I appreciate your help. Thanks!