public Keyboard() { keyboardState = new KeyboardState(); Device.RegisterDevice(UsagePage.Generic, UsageId.Keyboard, DeviceFlags.None); Device.KeyboardInput += new EventHandler <KeyboardInputEventArgs>(ReadKeyInput); }
public Mouse() { _mouseState = new MouseState(); Device.RegisterDevice(UsagePage.Generic, UsageId.Mouse, DeviceFlags.None); Device.MouseInput += new EventHandler <MouseInputEventArgs>(ReadMouseInput); }