private void SetKey_KeyDown(object sender, KeyEventArgs e) { if (set) { return; } if (e.KeyCode == Keys.Escape) { SetKey.Text = "None"; set = true; StartSW.Focus(); SetKey.Enabled = false; } else { SetKey.Text = e.Modifiers.ToString() + ", " + e.KeyCode.ToString(); } }
private void SetKey_KeyUp(object sender, KeyEventArgs e) { set = true; StartSW.Focus(); SetKey.Enabled = false; }