Whenever I am using an X11 session or a XWayland window, there is a chance the keyboard will stop working (globally for X11, only in XWayland windows if session is Wayland) until the session is restarted....
I’m not sure, there can always be other issues. But note that closing the window is not the same as terminating the application. When you close the window, the application gets a signal that it usually handles as cleaning up and shutting down. But if it is hanging, that task is not performed and resources are still held.
Way back at the dawn of time, there was a regular issue with low quality applications that would run XGrabKeyboard() (or XGrabPointer()), and then get stuck without releasing it again. If you can, try to log in over the network from another machine and kill application processes one by one until it releases? It’s most likely the video game (or library used by it) that has gotten stuck.
X11/XWayland stops registering keyboard inputs.
Whenever I am using an X11 session or a XWayland window, there is a chance the keyboard will stop working (globally for X11, only in XWayland windows if session is Wayland) until the session is restarted....