   [SlimDx] - Handling Keyboard and Mouse events
  Hi,Ive read everywhere that we shouldnt be using DirectInput anymore.So Im trying to find the correct alternative.Trying to tie up keys to my camera, Ive noticed the following conditions:form.KeyUp event - camera movement only occurs when I release the keyform.KeyPress event - doesnt seem to trigger for all keys (not function keys anyway) and only provides a numeric char valueform.KeyDown event - only handles one key press at a time.(I havent looked at mouse yet, but I assume I should be registering the form.mousemove event)These seem very clumsy though, and Im wondering if Im looking in the right place.Should I maybe use win32 apis to capture keyboard and mouse actions?Any thoughts?Luca   
  Use the classes in the SlimDX.RawInput namespace.   ;  Ahh brilliant, yes thats what I need. And there's a SlimDx already, how did I miss that.One last question, is it possible to trap two key presses at once, for example alt-enter?Or alternatively for the mouse, a left button held down whilst mouse moving?   ;  Use a combination of KeyDown and KeyUp. First declare an array of booleans somewhere in your code that your handlers can access. 256 elements should be enough. Then, in your KeyDown handler, do something like _keys[(int)e.KeyCode] = true; and in your KeyUp handler, do the same thing except set it to false. In this way you will have a keymap so to speak where the index 'KeyCode' is true if the key is pressed.That way you can still do things like multiple key presses very easily. I'll leave it up to you to play around with.   ;  But RawInput only has one keyboard event, SlimDX.RawInput.Device.KeyboardInput.How can I access the keydown/keyup events from here?   ;Quote:Original post by lucasiteBut RawInput only has one keyboard event, SlimDX.RawInput.Device.KeyboardInput.How can I access the keydown/keyup events from here?Disclaimer: I'm not familiar with the RawInput namespace, so forgive me if it is a better method of retrieving input. I'm just going by what I've used in C++ (WM_KEYDOWN/WM_KEYUP).The KeyDown/KeyUp handlers I'm referencing are the normal Form events that you were using before.   