Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is it possible to make Windows 7 laptop go onto sleep mode even if there is mouse movement?
I want it to go to sleep after lets say 30 minutes if there is no keyboard input, but even if there is mouse input, and I want it to wake up on keypress only, not on mouse input
Is it possible to do this, preferably from within Windows, without installing any other software?

share|improve this question
Setting an autohotkey/autoit script that log keyboard activity and send the standby command on timer would do the trick. But it use other software. – Martheen Cahya Paulo Apr 21 '13 at 14:43
I had thought about that, but can I make it ignore mouse input? The fact that the mouse is being moved will still be detected by the OS which will prevent it from going to sleep.I don't want mouse movement to prevent the OS from going to sleep – user13267 Apr 22 '13 at 0:11
Of course it can. Here's how it works, it run an infinite loop, that check every second. Everytime a key is pressed, the time is logged to a variable. Once the check find out the variable is older than a determined time span, it send one of the command described here… – Martheen Cahya Paulo Apr 22 '13 at 2:14
ok I understand what I need now. I need something like a keylogger that continuously monitors keystrokes and keeps track of a timer. The timer is reset every time a keypress is detected. When the timer reaches 30 minutes it should issue a sleep command, but I have to disable the Windows built in sleep feature. Thank you for your help. Now if I can only understand how to make a program capture keypresses even when it's window is not focused, I should be able to do this in C – user13267 Apr 22 '13 at 6:22
Thank you very much for your help @Martheen Cahya Paulo – user13267 Apr 22 '13 at 6:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.