Block mouse input when monitor goes into idle / sleep

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Ataricx
Posts: 34
Joined: 24 Feb 2019, 06:12

Block mouse input when monitor goes into idle / sleep

28 Apr 2019, 04:16

I've seen a bunch scripts here and there, but no one seems to work here.

Want i want, is that when the screen goes into sleep, the mouse is must go to.

Why? I accidentally move the mouse when i am on my couch, it moves a half a cm then the monitor is turned on again.

so maybe there is a way the monitor only turns on when space bar is entered or any other key ONLY when the pc is used with the keyboard

i dont know what's best, i use 2 screens : 1 pc monitor and 1 tv where i watch sometimes, but mainly i dont use the last option, but my mouse is on the table and is accidentally moved and my monitor flips on
User avatar
YoucefHam
Posts: 372
Joined: 24 Aug 2015, 12:56
Location: Algeria
Contact:

Re: Block mouse input when monitor goes into idle / sleep

28 Apr 2019, 14:17

bro just use the windows settings
https://imgur.com/a/2lpgaYH
Image
:wave: There is always more than one way to solve a problem. ;)
Ataricx
Posts: 34
Joined: 24 Feb 2019, 06:12

Re: Block mouse input when monitor goes into idle / sleep

30 Apr 2019, 04:33

@YoucefHam thanx but that's not what i am looking for.

i found this:

Code: Select all

BlockInput, MouseMove
but it has to be on a timer when (example) 5 minutes of inacticity

it has to be active when a mouse click is used or when using a keyboard

so no accendental movement on the couch and monitor switches on..

sorry, i didnt mean sleep, but on standby.
User avatar
Scr1pter
Posts: 1277
Joined: 06 Aug 2017, 08:21
Location: Germany

Re: Block mouse input when monitor goes into idle / sleep

30 Apr 2019, 04:38

Probably you must open the windows device manager and specify that the mouse cannot reactivate the PC from standby.
You know how to do that?

Cheers!
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Ataricx
Posts: 34
Joined: 24 Feb 2019, 06:12

Re: Block mouse input when monitor goes into idle / sleep

30 Apr 2019, 12:44

No, when a key is pressed (or mousebutton) the pc is in normal usage mode..... screen flips on, mouse and keyboard working...

when i use the code above, the mouse is blocked, so that works, only it need to reactivate again by a simple blockinput off after a key pressed or mouse button pressed
Ataricx
Posts: 34
Joined: 24 Feb 2019, 06:12

Re: Block mouse input when monitor goes into idle / sleep

02 May 2019, 13:46

I've found this script, which does work and almost does what i wanted, EXCEPT the screen doesnt go on on mouse CLICK

here is the link to the script :https://www.autohotkey.com/boards/viewtopic.php?p=123420#p123420
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

Re: Block mouse input when monitor goes into idle / sleep

03 May 2019, 11:59

When using devcon.exe there's no middle ground. It's either enabled or disabled... unless your mouse happens to report as multiple devices for additional buttons so then you can disable just one. I wonder whether AutoHotInterception could help, as it operates at driver level, to just block movement but not buttons high enough in the chain.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mikeyww and 174 guests