Wakeup PC upon mouse click but not mouse move

8

2

Can I differentiate between waking the Windows OS (Windows 7 and/or 8) from a mouse click vs mouse move? I only want the system to wake upon a click on the mouse but not when I move the mouse. I assume this is not a functionality considered in the Power Management options but maybe something can be done in the Registry? Any ideas?

Matthias Wolf

Posted 2013-02-15T09:30:13.370

Reputation: 375

1Check your motherboard BIOS if there is such a possibility, Although I have not seen a lot of cooperative models in this respect. – Hashirama Senju – 2013-02-16T01:32:24.837

Can you name a single motherboard that has such feature? Mine does not and I checked the obvious before I posted this question – Matthias Wolf – 2013-02-16T02:15:51.047

I do not recall which motherboard had that option, it was a long time ago so it's a difficult question. But usually it looks something like this: http://img.tomshardware.com/us/2005/09/22/bios_for_beginners/bios-power.jpg

– Hashirama Senju – 2013-02-16T10:58:23.783

1@HashiramaSenju, I do not see how your link points to anything that differentiates between mouse click vs mouse movements to awake a PC from sleep. – Matthias Wolf – 2013-02-16T17:07:46.517

+1 because it would be a cool feature to have. It's really easy to bump a mouse or touchpad accidentally. A click is a bit less likely to be accidental. I suppose you could write your own screensaver and have it respond (or not respond) to whatever events you desire, but unless you're a really good coder, it would have to be started manually by you - not just from the system input being idle or another power management event. – Joe – 2013-02-19T09:45:19.693

@Joe, agree its for a HTPC, the mouse is placed on the coffee table and I do not want the HTPC wake up from sleep each time the wireless mouse is moved by a bit. – Matthias Wolf – 2013-02-19T09:47:09.043

I don't think this will be possible (though I've not looked into it in a while), if I remember correctly most implementations deal with activity from the USB input in question - differentiating requiring more processing. – Jeeva – 2013-02-20T10:56:08.413

Answers

6

It would be a cool feature to have, but unfortunately it does not appear to be possible; Windows can be configured (via the powercfg command -- powercfg /? for more detail) to treat input from a given USB HID device as a reason (or not a reason) to wake from sleep, but not to differentiate between types of input. Writing a program to do that sort of differentiation would be relatively trivial, but by the time the machine can run that program to decide whether or not to wake up, it's already awake, and would instead have to decide whether or not to go back to sleep -- which probably doesn't help.

As a workaround, you might consider simply disabling the mouse as a device that can wake the PC; if you don't have a keyboard on the table next to the mouse, then this may not be a useful option, but it looks to be as close as you're going to get to what you're looking to accomplish. To do so, open a command shell and run

powercfg /devicequery wake_armed

You'll see your mouse device named in the list, possibly along with other devices. To disable wake input from the mouse, do

powercfg /devicedisablewake <name of mouse device>

And if you decide to re-enable it later, do so via

powercfg /deviceenablewake <name of mouse device>

Or you could just switch off the wireless mouse when you're not using it, which as a bonus may make its battery last a little bit longer.

Aaron Miller

Posted 2013-02-15T09:30:13.370

Reputation: 8 849

I am using an Apple keyboard which has 2 USB ports. I have inserted my wireless mouse receiver there. In the Device Manager, I disabled wake up from all mice. But Windows still woke up from mouse movement. The I disabled wake up from all keyboards. Windows did not wake up from mouse movement, but neither from keyboard input. Windows cannot differentiate a mouse from a keyboard in my setup? – Damn Vegetables – 2014-12-28T01:46:48.123

1Oh, right after I posted my previous comment, one idea came up and it worked. I just noticed there are 4 HID Keyboard Devices under Keyboards when I only have 2 keyboards. (Two sets of a Logitech mouse plugged into an Apple Keyboard) The Location of the two of them were 'on USB Input Device (Logitech...)'. I only disabled waking up from these 'keyboards', and now Windows only wakes up from keyboards but not from mice. It seems they are actually mice even though they are under Keyboards. – Damn Vegetables – 2014-12-28T01:55:23.907

@AaronMiller this is giving error though I am running CMD as Admin. "An unexpected error condition has occurred. Unable to perform operation. You may not have permission to perform this operation." – Sandeep Kumar – 2016-06-02T15:22:30.370

3Given the apparent impossibility of what I asked for I still mark your answer for the effort put in, thanks. – Matthias Wolf – 2013-02-21T16:09:51.193

Glad to be of help, and thanks for the accept! – Aaron Miller – 2013-02-22T19:58:36.013

Turning the wireless mouse off is what I do - it's practically second nature. But with a wired mouse, I have no choice except to disable it from waking the computer up from sleep, and then simply depending on the power button to wake it up. I don't know why it was never made an industry standard to ignore mouse moves at a BIOS level, given that pretty much everyone who used a computer must have run into this annoyance at some point in their life. – ADTC – 2014-04-11T04:03:28.490

1@ADTC Listening for a USB HID packet is cheaper than parsing it, would be my guess. – Aaron Miller – 2014-04-11T22:49:07.487

1

When trying to disable my mouse from waking up my computer entirely, I stumbled upon a solution. Windows might differentiate between your mouse movement sensor and the buttons.

My mouse movement sensor is under the Mice and other pointing devices section of Device Manager as HID-compliant mouse.

My mouse buttons are under Keyboards / HID Keyboard Device.

If I disable the ability for the mouse movement sensor to wake my computer, but leave the buttons (under keyboards), it will do exactly what you want.

notbad.jpeg

Posted 2013-02-15T09:30:13.370

Reputation: 111

Very interesting, will check it out on my machine, thanks for that possible solution. Will get back soon – Matthias Wolf – 2017-07-28T08:19:28.107

I have this too, but the PC remains waking on mouse movement, even when deselecting "Allow this device to wake the computer" on all HID-compliant mouse devices under Mice and other pointing devices. – Davor Josipovic – 2019-11-01T14:18:49.460