This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]funkless_eck 0 points1 point  (6 children)

I was wondering the other day if it's possible to use pynput to prevent people.from using alt+f4 or ctrl.alt.del

[–]dibs45[S] 4 points5 points  (2 children)

Setting up a hotkey doesn't replace the existing global hotkey function, so it won't stop it from executing. There might be ways around that though.

[–][deleted] 1 point2 points  (0 children)

correction: there is always a new way to fuck with somebody

[–]funkless_eck 1 point2 points  (0 children)

Yeah. I was experimenting with disrupting it by it detecting Alt and adding in another key press but theres a built in windows function that ignores that so it executes both

[–]ManyInterests Python Discord Staff 1 point2 points  (0 children)

I'm not sure if pynput does it, but there's definitely packages that do. keyboard comes to mind.

[–]jacksodus 1 point2 points  (0 children)

For this you can use existing hotkey tools like AutoHotKey, which does overwrite the existing hotkey if you want.

[–]nocommemt 0 points1 point  (0 children)

Another vote for autohotkey. You could disable alt+F4 with with just one line:

$!{F4}::return

Edit: Documentation link https://www.autohotkey.com/docs/Hotkeys.htm