Exemplo n.º 1
0
 private void Keyboard_KeyEvent(object sender, WindowsInput.Events.Sources.EventSourceEventArgs <WindowsInput.Events.Sources.KeyboardEvent> e)
 {
     if (curAssignment != null && e.Data.KeyDown != null)
     {
         Config.SetValue((string)curAssignment.Tag, "key_" + ((int)e.Data.KeyDown.Key));
         AsyncPrettyName(curAssignment);
         curAssignment = null;
     }
 }
Exemplo n.º 2
0
 private void Mouse_MouseEvent(object sender, WindowsInput.Events.Sources.EventSourceEventArgs <WindowsInput.Events.Sources.MouseEvent> e)
 {
     if (curAssignment != null && e.Data.ButtonDown != null)
     {
         Config.SetValue((string)curAssignment.Tag, "mse_" + ((int)e.Data.ButtonDown.Button));
         AsyncPrettyName(curAssignment);
         curAssignment = null;
     }
 }
Exemplo n.º 3
0
        private static void Keyboard_KeyEvent(object sender, WindowsInput.Events.Sources.EventSourceEventArgs <WindowsInput.Events.Sources.KeyboardEvent> e)
        {
            if (e.Data.KeyDown != null)
            {
                string res_val = Config.Value("reset_mouse");
                if (res_val.StartsWith("key_"))
                {
                    if ((int)e.Data.KeyDown.Key == Int32.Parse(res_val.Substring(4)))
                    {
                        WindowsInput.Simulate.Events().MoveTo(Screen.PrimaryScreen.Bounds.Width / 2, Screen.PrimaryScreen.Bounds.Height / 2).Invoke();
                    }
                }

                res_val = Config.Value("active_gyro");
                if (res_val.StartsWith("key_"))
                {
                    if ((int)e.Data.KeyDown.Key == Int32.Parse(res_val.Substring(4)))
                    {
                        foreach (var i in mgr.j)
                        {
                            i.active_gyro = true;
                        }
                    }
                }
            }

            if (e.Data.KeyUp != null)
            {
                string res_val = Config.Value("active_gyro");
                if (res_val.StartsWith("key_"))
                {
                    if ((int)e.Data.KeyUp.Key == Int32.Parse(res_val.Substring(4)))
                    {
                        foreach (var i in mgr.j)
                        {
                            i.active_gyro = false;
                        }
                    }
                }
            }
        }
 private void H_ButtonDown(object sender, WindowsInput.Events.Sources.EventSourceEventArgs <WindowsInput.Events.ButtonDown> e)
 {
     Trace.WriteLine("down");
 }
 private void H_ButtonClick(object sender, WindowsInput.Events.Sources.EventSourceEventArgs <WindowsInput.Events.ButtonClick> e)
 {
     Trace.WriteLine("Button Click");
 }