Ejemplo n.º 1
0
        private void clearButton_Click(object sender, EventArgs e)
        {
            _currentKey = new KeyPressedInfo();

            UpdateKeyInfo(_currentKey);
            NewKeyDefined.Invoke(this, null);
        }
Ejemplo n.º 2
0
        protected override void OnKeyUp(KeyEventArgs e)
        {
            if (_currentKey.KeyValue == 0)
            {
                _currentKey.Modifiers = 0;
            }

            UpdateKeyInfo(_currentKey);

            if (e.KeyValue == _currentKey.KeyValue)
            {
                NewKeyDefined.Invoke(this, null);
            }

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