carrot69 / keep-presence

Keeps your computer awake by moving the mouse or pressing a key when you step away.
Creative Commons Zero v1.0 Universal
257 stars 38 forks source link

Inactivity detected while playing FPS games with Wine/Proton #19

Open maximusyellow opened 1 year ago

maximusyellow commented 1 year ago

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

carrot69 commented 1 year ago

Hi @maximusyellow ! One option you could try is the --circular option, which makes the cursor move in circles. If you combine it with the --pixels 1 option, the cursor will move only 1 pixel circularly.

keep-presence --circular --pixels 1

I understand that this doesn't fix your problem, especially for playing FPS games. I'm working on a solution, but it won't be ready quickly. I'll keep you updated!