Pause key not working

When I try to check if the Pause key is down (Keyboard.GetState().IsKeyDown(Keys.Pause)) it very often doesn’t work. Why? All the other keys seem to be detected correctly…

I tried to use the GetKeyState function from the user32.dll (Windows only) and it has the same issue, so I think MonoGame has nothing to do with it…

I also noticed that the key combination RightCtrl + ArrowUp + ArrowLeft does not work (only two of three keys are detected). At a certain point I had the doubt that it could be a keyboard problem, so I tried to use another one and everything works out well (Pause button and the aforementioned key combination). I hope I haven’t bored you …

Hi Luca_Carminati,
Could you please share me details of what you did for the keyboard issue, to resolve the pause-break key simulation?

As I said, I just changed the keyboard. It seems that the problem is not with MonoGame or Windows but with the keyboard itself.

I’m not sure about the pause key issue, but I can answer the multiple key combo not working problem. USB membrane keyboards have limits to the number of simultaneous key presses that can be registered at once. So some inputs may be dropped when holding down multiple keys, especially, I believe, keys that are close by one another.

Mechanical keyboards and keyboards connected via the PS/2 connection, as far as I’m aware, won’t run into the same limitation. My mechanical keyboard can detect most or all of the keys when I try to press down as many of them as I can. There may still technically be a limit to the number of keys that can be detected at once, but it’s so high that it doesn’t matter.

You can test it out here!