Ejemplo n.º 1
0
 public BindedAction(bool ctrl, bool alt, bool shift, Func<bool> action, Native.VirtualKey key)
 {
     _ctrl = ctrl;
     _alt = alt;
     _shift = shift;
     _executeAction = action;
     _key = key;
 }
Ejemplo n.º 2
0
 public static void AddKeyupAction(Native.VirtualKey key, Func <bool> action, bool ctrl = false, bool alt = false, bool shift = false)
 {
     _keyUpActions[(int)key].Add(new BindedAction(ctrl, alt, shift, action, key));
 }
Ejemplo n.º 3
0
 public static void AddKeyupAction(Native.VirtualKey key, Action action, bool ctrl = false, bool alt = false, bool shift = false)
 {
     AddKeyupAction(key, ReturnFalse(action), ctrl, alt, shift);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Used to check whether the Ctrl, Alt or Shift keys are being held down.
 /// </summary>
 private static bool IsModifierPressed(Native.VirtualKey key)
 {
     return((Native.GetKeyState(key) & 0x80000000) != 0);
 }
Ejemplo n.º 5
0
 public static void AddConditionToBlockTextInput(Func <bool> condition, Native.VirtualKey key, bool ctrl = false, bool alt = false, bool shift = false)
 {
     AddKeydownAction(key, condition, ctrl, alt, shift);
 }