/// <summary> /// Check if an event is mouse event or not. /// </summary> /// <param name="deviceEvent">Device event.</param> /// <returns>Mouse event or not.</returns> public static bool IsMouseEvent(this DeviceEvent deviceEvent) { return(deviceEvent.GetDevice() == Device.Mouse); }
/// <summary> /// Check if an event is key event or not. /// </summary> /// <param name="deviceEvent">Device event.</param> /// <returns>Key event or not.</returns> public static bool IsKeyEvent(this DeviceEvent deviceEvent) { return(deviceEvent.GetDevice() == Device.Keyboard); }