Esempio n. 1
0
 public TestDirectInput()
 {
     InitializeComponent();
     idk        = DirectInputDevices.InputDeviceKeyboard.CreateKeyboard();
     t.Interval = 250;
     t.Tick    += T_Tick;
     t.Start();
 }
        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 InputDeviceKeyboard CreateKeyboard()      // direct keyboard make, not part of elite UI
        {
            DirectInput dinput = new DirectInput();

            foreach (DeviceInstance di in dinput.GetDevices(DeviceClass.Keyboard, DeviceEnumerationFlags.AttachedOnly))
            {
                InputDeviceKeyboard k = new InputDeviceKeyboard(dinput, di);
                return(k);
            }

            return(null);
        }
Esempio n. 4
0
        public TestDirectInput()
        {
            InitializeComponent();
            idk        = DirectInputDevices.InputDeviceKeyboard.CreateKeyboard();
            t.Interval = 250;
            t.Tick    += T_Tick;
            t.Start();

            t2.Interval = 2000;
            t2.Tick    += T2_Tick;

            t3.Interval = 10000;
            t3.Tick    += T3_Tick;
            // t3.Start(); // t3 is autostart test to check still sends when don't have focus
        }