Ejemplo n.º 1
0
        public formHotkey()
        {
            InitializeComponent();

            txtCombo.Text = ImgyazurIcon.Instance.keyComboSettings.ToKeyCombo().ToString();

            this.ShortcutHook = new Hook("Shortcut Capture Hook");
            this.ShortcutHook.KeyDownEvent += e =>
            {
                if (txtCombo.Focused)
                {
                    CurrentKeyCombo = KeyCombo.FromKeyboardHookEventArgs(e);
                    UpdateShortcutDisplay();
                }
            };
        }
Ejemplo n.º 2
0
        public ShortcutItemConfiguration()
        {
            InitializeComponent();

            this.MinimumSize = this.Size;

            this.ShortcutHook = new Hook("Shortcut Capture Hook");
            this.ShortcutHook.KeyDownEvent += e =>
                {
                    if (tbShortcut.Focused)
                    {
                        CurrentKeyCombo = KeyCombo.FromKeyboardHookEventArgs(e);
                        UpdateShortcutDisplay();
                    }
                };

            lvActions.Select();
        }
Ejemplo n.º 3
0
 public void FromKeyCombo(KeyCombo keyCombo)
 {
     this["Key"] = keyCombo.Key;
     this["isCtrlPressed"] = keyCombo.isCtrlPressed;
     this["isAltPressed"] = keyCombo.isAltPressed;
     this["isShiftPressed"] = keyCombo.isShiftPressed;
     this["isWinPressed"] = keyCombo.isWinPressed;
 }