If you are to play FPS games, or any game that locks mouse movement through Wine or Proton, script does not check for activity outside of checking if cursor coordinates have been changed. In this case, with the cursor locked, it thinks that there is inactivity, forcing mouse to be moved. This causes the mouse to no longer be focused onto the game window.
Proposed fix: use mouse and keyboard listeners to check if there was activity in between the sleep calls apart from just checking pointer location
If you are to play FPS games, or any game that locks mouse movement through Wine or Proton, script does not check for activity outside of checking if cursor coordinates have been changed. In this case, with the cursor locked, it thinks that there is inactivity, forcing mouse to be moved. This causes the mouse to no longer be focused onto the game window.
Proposed fix: use mouse and keyboard listeners to check if there was activity in between the sleep calls apart from just checking pointer location