public static void CreateKeyboard(InputDeviceList ilist) { DirectInput dinput = new DirectInput(); foreach (DeviceInstance di in dinput.GetDevices(DeviceClass.Keyboard, DeviceEnumerationFlags.AttachedOnly)) { InputDeviceKeyboard k = new InputDeviceKeyboard(dinput, di); ilist.Add(k); } }
public static void CreateMouse(InputDeviceList ilist) { DirectInput dinput = new DirectInput(); foreach (DeviceInstance di in dinput.GetDevices(DeviceClass.Pointer, DeviceEnumerationFlags.AttachedOnly)) { InputDeviceMouse k = new InputDeviceMouse(dinput, di); ilist.Add(k); } }
public static void CreateJoysticks(InputDeviceList ilist, bool axisevents) { DirectInput dinput = new DirectInput(); foreach (DeviceInstance di in dinput.GetDevices(DeviceClass.GameControl, DeviceEnumerationFlags.AttachedOnly)) { // if (di.InstanceName.Contains("Logitech")) { InputDeviceJoystickWindows j = new InputDeviceJoystickWindows(dinput, di, axisevents); ilist.Add(j); } } }