Beispiel #1
0
 public void gestureOccurs(GestureEvent e)
 {
     if (lookup.ContainsKey(e.GetType()))
     {
         WindowsInput.VirtualKeyCode ekey = lookup[e.GetType()];
         //InputSimulator.SimulateModifiedKeyStroke(VirtualKeyCode.RMENU, ekey);
         InputSimulator.SimulateKeyPress(ekey);
     }
 }
Beispiel #2
0
        /*
         * This method is called when the user changes the clutch key textbox. It simply changes which key value is sent.
         */
        public void SetClutchKey(WindowsInput.VirtualKeyCode newKey)
        {
            // Be sure to reset the key if it is down.
            if (clutchDown)
            {
                InputSimulator.SimulateKeyUp(clutchKey);
                clutchDown = false;
            }

            this.clutchKey = newKey;
        }
Beispiel #3
0
        /*
         * This method is called when the user changes the brake key textbox. It simply changes which key value is sent.
         */
        public void SetBrakeKey(WindowsInput.VirtualKeyCode newKey)
        {
            // Be sure to reset the key if it is down.
            if (brakeDown)
            {
                InputSimulator.SimulateKeyUp(brakeKey);
                brakeDown = false;
            }

            this.brakeKey = newKey;
        }
Beispiel #4
0
        /*
         * This method is called when the user changes the gas key textbox. It simply changes which key value is sent.
         */
        public void SetGasKey(WindowsInput.VirtualKeyCode newKey)
        {
            // Be sure to reset the key if it is down.
            if (gasDown)
            {
                InputSimulator.SimulateKeyUp(gasKey);
                gasDown = false;
            }

            this.gasKey = newKey;
        }
Beispiel #5
0
        public static WindowsInputSimulator.Native.VirtualKeyCode ToMySimulatorKeyCode(WindowsInput.VirtualKeyCode _keyCode)
        {
            var values2 = Enum.GetValues(typeof(WindowsInputSimulator.Native.VirtualKeyCode)).Cast <WindowsInputSimulator.Native.VirtualKeyCode>();

            foreach (var item in values2)
            {
                if (item.ToString().ToLower() == _keyCode.ToString().ToLower())
                {
                    return(item);
                }
            }
            return(WindowsInputSimulator.Native.VirtualKeyCode.EMPTY);
        }