12
2
My Windows 7 system is set to lock the screen after 20 minutes of inactivity (this is a workplace-enforced policy; I cannot change this setting).
When I am using the keyboard/mouse, Windows treats them as user inputs, and thus the screen remains unlocked. However, when I am playing any game using only joystick, Windows treats that as no activity, and thus the screen gets locked after the timeout.
Is there a way to prevent screen lock while using joystick-based games?
As a workaround, I am currently playing some random video (muted) in the background using VLC, which prevents screen lock. But there should be a better way to handle this problem...
I could possibly write a script, which would simulate some keystrokes like {NUMLOCK}{NUMLOCK}
via sendkeys
. However, there is always a possibility of an unintended side-effect of this, such as preventing me from using these keys in my game options.
Yes it can be achieved in way you suggest. But did you check whether you can switch power plans? (Instead of changing power plan settings.) Sometimes High Performance power plan has energy-saving features disabled. And also: if they locked your power plan settings, did they leave unlocked the ability to install or run software not authorized by admins? – miroxlav – 2015-02-23T09:10:52.750
"Sometimes High Performance power plan has energy-saving features disabled" Good idea.. However, this setting is enforced as policy in screen-saver settings, not power-plan settings. "did they leave unlocked the ability to install or run software not authorized by admins" In general, yes, but those softwares cannot change the settings enforced by policy. – anishsane – 2015-02-23T09:51:24.693
Does anyone know of any windows API, to prevent screen lock, the one that media players like VLC use, while playing videos? – anishsane – 2015-02-23T09:52:43.693