private void HandleGlobalKeyDown(object sender, KeyEventArgs e) { _activeCombination = EnumUtility.AddKey(_activeCombination, e.KeyData); if (_activeCombination == _combinationToListen) { e.Handled = true; OnKeyCombinationPressed(); } }
public void AddKey_IsCorrect() { Keys modified = EnumUtility.AddKey(Keys.L, Keys.Control); Assert.That(modified, Is.EqualTo(Keys.L | Keys.Control)); }