public BindedAction(bool ctrl, bool alt, bool shift, Func<bool> action, Native.VirtualKey key) { _ctrl = ctrl; _alt = alt; _shift = shift; _executeAction = action; _key = key; }
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)); }
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); }
/// <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); }
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); }