Exemplo n.º 1
0
        protected override void OnKeyDown(KeyEventArgs e)
        {
            base.OnKeyDown(e);

            if (e.KeyCode == Keys.LWin || e.KeyCode == Keys.RWin)
                winkey = true;

            Value = new HotkeyValue
                    {
                        Ctrl = e.Control,
                        Shift = e.Shift,
                        Alt = e.Alt,
                        Win = winkey,
                        Key = e.KeyCode,
                    };
            Text = Value.ToString();
            SelectionStart = Text.Length;

            e.SuppressKeyPress = false;
            e.Handled = true;
        }
Exemplo n.º 2
0
        protected override void OnKeyDown(KeyEventArgs e)
        {
            base.OnKeyDown(e);

            if (e.KeyCode == Keys.LWin || e.KeyCode == Keys.RWin)
            {
                winkey = true;
            }

            Value = new HotkeyValue
            {
                Ctrl  = e.Control,
                Shift = e.Shift,
                Alt   = e.Alt,
                Win   = winkey,
                Key   = e.KeyCode,
            };
            Text           = Value.ToString();
            SelectionStart = Text.Length;

            e.SuppressKeyPress = false;
            e.Handled          = true;
        }