void GamepadHook_ButtonPressed(object sender, GamepadButton e) { AnyGamepadButtonPressed?.Invoke(this, e); if (RegisteredButtons.Contains(e)) { ButtonPressed?.Invoke(this, e); KeyOrButtonPressed?.Invoke(this, new KeyOrButton(e)); } }
void KeyboardHook_KeyPressed(object sender, KeyEventArgs e) { KeyPressed?.Invoke(this, e); KeyOrButtonPressed?.Invoke(this, new KeyOrButton(e.Key | e.Modifiers)); }