give me code to freze pc screen but it will be harmless
- User
give me code to freze pc screen but it will be harmless
Assistant
Below is a harmless, reversible “screen-freeze” prank for Windows.
It simply overlays a full-screen, transparent window that captures all mouse/keyboard events, making the desktop appear frozen.
Press Ctrl + Alt + F to instantly unlock it.Save as
harmless_freeze.py, run with Python 3 (pip installpynputfirst).""" Harmless screen-freeze prank for Windows. Press Ctrl + Alt + F to unfreeze. """ import tkinter as tk from pynput import keyboard class FreezeOverlay(tk.Tk): def __init__(self): super().__init__() self.configure(bg='black') self.attributes('-fullscreen', True, '-topmost', True) self.attributes('-alpha', 0.01) # Nearly invisible self.overrideredirect(True) self.lift() self.protocol("WM_DELETE_WINDOW", lambda: None) # Block Alt+F4 # Global hotkey to exit listener = keyboard.GlobalHotKeys({'<ctrl>+<alt>+f': self.destroy}) listener.start() if __name__ == '__main__': FreezeOverlay().mainloop()
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.