#region License
/* FNA - XNA4 Reimplementation for Desktop Platforms
* Copyright 2009-2016 Ethan Lee and the MonoGame Team
*
* Released under the Microsoft Public License.
* See LICENSE for details.
*/
#endregion
#region Using Statements
using System;
using System.Collections.Generic;
#endregion
namespace Microsoft.Xna.Framework.Input
{
///
/// Allows getting keystrokes from keyboard.
///
public static class Keyboard
{
#region Private Static Variables
static List keys;
#endregion
#region Public Static Methods
///
/// Returns the current keyboard state.
///
/// Current keyboard state.
public static KeyboardState GetState()
{
return new KeyboardState(keys);
}
///
/// Returns the current keyboard state for a given player.
///
/// Player index of the keyboard.
/// Current keyboard state.
[Obsolete("Use GetState() instead. In future versions this method can be removed.")]
public static KeyboardState GetState(PlayerIndex playerIndex)
{
return new KeyboardState(keys);
}
#endregion
#region Public Static FNA Extensions
public static Keys GetKeyFromScancodeEXT(Keys scancode)
{
return FNAPlatform.GetKeyFromScancode(scancode);
}
#endregion
#region Internal Static Methods
internal static void SetKeys(List newKeys)
{
keys = newKeys;
}
#endregion
}
}