private void TextBoxKeyUp(object sender, KeyEventArgs e) { e.Handled = true; e.SuppressKeyPress = true; if (HotkeyUtils.GetModifierKeys(e.KeyCode) == Keys.None) { RecordHotkeys(); return; } if (hotkeyRecorded == false) { newModifiers = e.Modifiers; } UpdateHotkeyName(); }
private void TextBoxKeyDown(object sender, KeyEventArgs e) { e.Handled = true; e.SuppressKeyPress = true; if (hotkeyRecorded == true) { hotkeyRecorded = false; newKey = Keys.None; newModifiers = Keys.None; } if (HotkeyUtils.GetModifierKeys(e.KeyCode) == Keys.None) { newKey = e.KeyCode; } newModifiers = e.Modifiers; UpdateHotkeyName(); }