diff --git a/Source/OpenTK/GameWindow.cs b/Source/OpenTK/GameWindow.cs index cfab2243..2a6df0c1 100644 --- a/Source/OpenTK/GameWindow.cs +++ b/Source/OpenTK/GameWindow.cs @@ -596,28 +596,34 @@ namespace OpenTK #region Keyboard + #pragma warning disable 0612 + /// /// Gets the primary Keyboard device, or null if no Keyboard exists. /// - [Obsolete("Use KeyDown, KeyUp and KeyPress events or OpenTK.Input.Keyboard instead.")] public KeyboardDevice Keyboard { get { return InputDriver.Keyboard.Count > 0 ? InputDriver.Keyboard[0] : null; } } + #pragma warning restore 0612 + #endregion #region Mouse + #pragma warning disable 0612 + /// /// Gets the primary Mouse device, or null if no Mouse exists. /// - [Obsolete("Use MouseMove, MouseDown, MouseUp and MouseWheel events or OpenTK.Input.Mouse, instead.")] public MouseDevice Mouse { get { return InputDriver.Mouse.Count > 0 ? InputDriver.Mouse[0] : null; } } + #pragma warning restore 0612 + #endregion #region --- GameWindow Timing --- diff --git a/Source/OpenTK/Input/KeyboardDevice.cs b/Source/OpenTK/Input/KeyboardDevice.cs index cb64f178..04b5d189 100644 --- a/Source/OpenTK/Input/KeyboardDevice.cs +++ b/Source/OpenTK/Input/KeyboardDevice.cs @@ -161,6 +161,29 @@ namespace OpenTK.Input #region --- Public Methods --- + /// + /// Retrieves the combined for all keyboard devices. + /// This method is equivalent to . + /// + /// An structure containing the combined state for all keyboard devices. + /// + public KeyboardState GetState() + { + return Keyboard.GetState(); + } + + /// + /// Retrieves the for the specified keyboard device. + /// This method is equivalent to . + /// + /// The index of the keyboard device. + /// An structure containing the combined state for all keyboard devices. + /// + public KeyboardState GetState(int index) + { + return Keyboard.GetState(index); + } + /// Returns the hash code for this KeyboardDevice. /// A 32-bit signed integer hash code. public override int GetHashCode() diff --git a/Source/OpenTK/Input/MouseDevice.cs b/Source/OpenTK/Input/MouseDevice.cs index f5b32071..32585a03 100644 --- a/Source/OpenTK/Input/MouseDevice.cs +++ b/Source/OpenTK/Input/MouseDevice.cs @@ -88,6 +88,40 @@ namespace OpenTK.Input #region --- Public Members --- + /// + /// Retrieves the combined hardware for all specified mouse devices. + /// This method is equivalent to . + /// + /// A structure representing the state for the specified mouse device. + /// + public MouseState GetState() + { + return Mouse.GetState(); + } + + /// + /// Retrieves the hardware for the specified mouse device. + /// This method is equivalent to . + /// + /// The index of the mouse device. + /// A structure representing the state for the specified mouse device. + /// + public MouseState GetState(int index) + { + return Mouse.GetState(index); + } + + /// + /// Retreves the for the mouse cursor. + /// This method is equivalent to . + /// + /// A structure representing the state of the mouse cursor. + /// + public MouseState GetCursorState() + { + return Mouse.GetCursorState(); + } + #region public int NumberOfButtons ///