So i'm making a stupid rickroll for fun, something unoffensive only to learn python (I am a beginner) and I am wondering how to block the mouse and the keyboard temporarily so you can't close the tabs, but I don't know how. I have seen a few ways to do this, but some of them doesn't even work, and the rest use pyhook, and i've been struggling with downloading it for an hour, but I can't. Is there a way to do that in Windows that still work nowadays without using pyhook? Thanks :). Also, please let me know if I wrote something wrong (i'm from spain and I don't have a perfect English)
Here is the code of the rickroll:
import webbrowser
import time
for i in ("aaaaaaaaaaaaaaaaaaaa"):
webbrowser.open("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
time.sleep(2)
print("YOU GOT RICKROLLED HAHAHAHAHA")