I've recently swapped from MDX 2.0 to SlimDX, using Direct3D 11, but I'm struggling to implement keyboard and mouse controls.
In MDX you can use
keyb = new Microsoft.DirectX.DirectInput.Device(SystemGuid.Keyboard);
keyb.SetCooperativeLevel(this, CooperativeLevelFlags.Background | CooperativeLevelFlags.NonExclusive);
keyb.Acquire();
to set up a keyboard interface, however SlimDX has a different method. In SlimDX the Device is an abstract class, instead there is a Keyboard class that must be initialized by passing in a DirectInput object, but I can't for the life of me work out how to create a DirectInput object or what it's for.
As far as I can find documentation is pretty slim for SlimDX, if anybody knows of any good resources for learning its particular quirks that would be fantastic, thanks.
I used it in this way. The mouse handling is the same.
But you should use SlimDX.RawInput because Microsoft recommends it:
(http://en.wikipedia.org/wiki/DirectInput)
A rawinput mouse sample (keyboard is nearly the same):
Now you can react on the events.