How to detect key stroke/pressing combinations and disable them
-
I would go for "RegisterHotKey":http://goo.gl/KAD5K, which should work for any combinations besides CTRL+ALT+DEL.
As far as I remember there was a possibility to disable the task manager by setting HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr to DWORD:1 - perhaps this disables CTRL+ALT+DEL too.
-
Well, i thought we agreed that there is no Qt solution and that you will have to use platform specific code.
[quote author="peppe" date="1317060189"]Platform specific code. Those keys are not even passed to an application.[/quote]
[quote author="Volker" date="1317067782"]As peppe already mentioned, you will have to resort to platform specific code then. Qt provides no means to intercept this (wich is a good thing™ - IMHO).[/quote]
[quote author="umen242" date="1317095537"]ho no problem , i i know that Qt dosnt have any " automatic" handler for this , i juts wanted to know which best "pattern"
or way to handle this [/quote] -
Probably an third-party library like "Qxt":http://libqxt.bitbucket.org/doc/tip/qxtglobalshortcut.html might provide what you are looking for.
-
[quote author="umen242" date="1317109307"]why there is no ? i dont understand , there is keyevents in Qt [/quote]
Start reading and understanding before crying about things you cannot change. The answers have been given already.
[quote author="peppe" date="1317060189"]Platform specific code. Those keys are not even passed to an application.[/quote]
[quote author="Volker" date="1317065718"]Alt-Tab is handled by the OS too and used to switch applications.
Unless you want to outrage your users you should not even think about fiddling around with that key sequences![/quote]
And regarding the rest:
[quote author="umen242" date="1317109307"]i just need good algorithm to use it right . basically i didn't what to write something if there is already implementation [/quote]
You have been told multiple times that there is no platform independent means in Qt. Crying out loudly will not change this situation in any bit involved. So I suggest you save your time and start coding.
-
Qt is meant to write applications that run in a platform independent way, for the most parts. There might be some that will not be handled by Qt, e.g. if you want to do some stuff that is rearly used, like hooking system events and handle them instead leaving them to the system.
Those things must be done in an OS dependent way. QT is no 100% OS abstraction, otherwise it would have to emulate all features that windows has and Linux not on Linux and perhaps on MAC, and vice versa.