Hello! I’m having some trouble with input in MonoGame.
When running a DX build it’s easy enough to do:
var form = Win.Control.FromHandle(winHandle); form.MouseDown += Input_MouseDown; form.MouseUp += Input_MouseUp; form.MouseClick += Input_MouseClick; form.MouseDoubleClick += Input_MouseDoubleClick; form.MouseMove += Input_MouseMove; form.MouseWheel += Input_MouseWheel; form.KeyDown += Input_KeyDown; form.KeyUp += Input_KeyUp;
To access the input of the actual window. However when running GL (3.5 OpenTK or 3.6 SDL2) I guess those libraries does not use a regular WinForm internally so it does not work. How do you recommend getting input from MonoGame? I cannot use Keyboard.GetState() for my use case since it does not keep up when a user types fast. I need to buffer the input.
game.Window.TextInput += window_TextInput;
exists but that’s only CharEntered. I would need KeyDown, KeyUp, MouseDown etc. as well.