Freeze/Disable Mouse&keyboard movement
Freeze/Disable Mouse&keyboard movement
Can anyone make a simple script that when i press ctrl+s, it will disable keyboard and mouse
Re: Freeze/Disable Mouse&keyboard movement
Be careful with Block commands.
Save all opened files and be aware of the fact you might have to use the reset button of your PC.
https://autohotkey.com/docs/commands/BlockInput.htm
I tried it but for me it didn't work.
Maybe because I'm no admin.
Leave the Sleep time, test it.
If it works, remve it and create another hotkey which enables keyboard and mouse again.
For example:
But I have no idea if it actually will work.
Regards
Save all opened files and be aware of the fact you might have to use the reset button of your PC.
https://autohotkey.com/docs/commands/BlockInput.htm
I tried it but for me it didn't work.
Maybe because I'm no admin.
Code: Select all
^s:: ; Ctrl+S
BlockInput, On ; Disable keyboard and mouse input
Sleep, 5000
BlockInput, Off ; Enable keyboard and mouse input
return
If it works, remve it and create another hotkey which enables keyboard and mouse again.
For example:
Code: Select all
Esc::
BlockInput, Off ; Enable keyboard and mouse input
return
Regards
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
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Re: Freeze/Disable Mouse&keyboard movement
Regards[/quote]
i tried this code
it doesnt work
i tried this code
Code: Select all
s:: ; Ctrl+S
BlockInput, On ; Disable keyboard and mouse input
Esc::
BlockInput, Off ; Enable keyboard and mouse input
return
-
- Posts: 27
- Joined: 08 Aug 2018, 07:27
Re: Freeze/Disable Mouse&keyboard movement
This will not work because you miss return
And if Escape key didn't work you allways can disable Blockinput by pressing Ctrl+Alt+Del. It will re-enable input due to a Windows API feature like say's in documentation
Code: Select all
^s:: ; Ctrl+S
KeyWait Control ; waiting that controll wil relese to not have "stuck down"
BlockInput, On ; Disable keyboard and mouse input
return ; missed that return in first code
$~esc::
BlockInput Off
Who is online
Users browsing this forum: No registered users and 154 guests