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(); }
private void UpdateKey() { OnKeySelected?.Invoke(isKeyInputValid); }