How to disable all system shortcut keys in python application | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to disable all system shortcut keys in python application

I want to disable all shortcut key like Alt+F4,Alt+Tab, Windows+D etc in my python application. how to disable it..? please help me if anyone knows it...!!

29th Jul 2017, 6:53 AM
Mohsin Mansuri
1 Answer
0
You cannot just disable it as it is handled on lower level than your programm runs (Like Alt+F4 is handled by console before it gets to programm itself). The only way is using Windows hooks (with can be quite complicated in python) and catch all keys before it gets even to desktop manager. Note that this won't block Ctrl+Alt+Delete as it is handled directly by system
16th Aug 2017, 12:26 AM
Michal Pácal
Michal Pácal - avatar