Monogame has an Input class that XNA doesn't

I have a class named Input.cs that I use for all user input related tasks and upon porting to MonoGame from XNA I found that Monogame has an Microsoft.Xna.Framework.Input.Input class that didn’t exist in XNA 4.0.

Does anyone know why this exists? Or if it’s not supposed to but my install of Monogame does for some weird reason?

Thanks =]

Steve

It is part of the desktop-only implementetion of GamePad. It is obsolete and doesn’t follow XNA in any way. It wasn’t really touched in years.

Which file is this old GamePad class in? Can you give me a link from the repo to it…

https://github.com/mono/MonoGame/tree/develop/MonoGame.Framework

Sorry, not entirely sure what you’re asking for. If you tell me where to look I can get it for you.

The class itself is
Microsoft.Xna.Framework.Input.Input

and it looks like it’s from Monogame.Framework.dll

The class is for the most part empty

public class Input
{
public int ID;
public InputType Type;

 public Input();

 public bool Negative { get; set; }

}

Never mind I found it.

You mean this class…

https://github.com/mono/MonoGame/blob/develop/MonoGame.Framework/Desktop/Input/Input.cs

We should totally kill that stuff off to keep from confusing people.

I wonder if anyone is still using it. It is totally custom so even if you wrote gamepad handling the XNA way, you would have to totally rewrite it to use this desktop implementation.

Keyboard input

KeyboardState thekey

Initialize
thekey = new KeyboardState();

Update
thekey = Keyboard.GetState();

// getting key in update

if (thekey.IsKeyDown(Keys.Enter))
{

        }

I’m really thinking about submitting a PR killing it off.