Lock keyboard and mouse while playing youtube in windows 10?
-
- Posts: 1
- Joined: 02 Jul 2022, 20:57
Lock keyboard and mouse while playing youtube in windows 10?
Is this possible? How? I keep getting distracted in youtube. So I thought if the mouse and keyboard gets locked, I'd be more focused. I just need "space" and "arrow" keys unlocked and i'd be good.
Re: Lock keyboard and mouse while playing youtube in windows 10?
Hallo,
only "space" and "arrow" keys unlocked is inconvenient.
Escape minimizes Youtube and thus deactivates the lock:
only "space" and "arrow" keys unlocked is inconvenient.
Escape minimizes Youtube and thus deactivates the lock:
Code: Select all
SetTitleMatchMode, 2
Hotkey, IfWinActive, YouTube
For all, LF in [[0x1FF,"sc{:X}"],[0xFF,"vk{:X}"]]
Loop,% LF.1
IF (""<Key:=GetKeyName(Format(LF.2, A_Index)))
And !InStr("{Escape}{Space}{Left}{Right}{Up}{Down}", "{" Key "}")
Hotkey, *%Key%, :X:Y
#IfWinActive, YouTube
~*Esc::WinMinimize, A
:X:Y::Return
#If