/// <summary> /// Returns if a Key was just tapped /// </summary> /// <param name="key">Key to check</param> /// <returns>True if it was just tapped</returns> public Boolean IsKeyTapped(Keys key) { return(CurrKeys.IsKeyDown(key) && !PrevKeys.IsKeyDown(key)); }
/// <summary> /// Returns all key presses that were just tapped /// </summary> /// <returns>Key presses that were just tapped</returns> public Keys[] GetKeysTapped() { IEnumerable <Keys> result = CurrKeys.GetPressedKeys().Except(PrevKeys.GetPressedKeys()); return(result.ToArray()); }