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

            if (isSelectingKey)
            {
                SelectedKeyCode = e.KeyCode;
                isSelectingKey  = false;

                OnKeySelected?.Invoke(this, new KeySelectedEvent()
                {
                    Key = e.KeyCode
                });
            }

            Invalidate();
        }
Esempio n. 2
0
 private void UpdateKey()
 {
     OnKeySelected?.Invoke(isKeyInputValid);
 }