Re: disable ALT+CTRL+DEL!!!!
ctrl-alt-del on windows is the "Secure attention sequence", so you can't filter it (Well, you could write a keyboard hook driver), but you can use a Windows API to disable it easily using SystemParametersInfo() :
Code:
SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, TRUE, &bOldState, 0);
Re: disable ALT+CTRL+DEL!!!!
Quote:
Originally Posted by
fatjuicymole
ctrl-alt-del on windows is the "Secure attention sequence", so you can't filter it (Well, you could write a keyboard hook driver), but you can use a Windows API to disable it easily using SystemParametersInfo() :
Code:
SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, TRUE, &bOldState, 0);
Thank you very much. But i need Qt methods. can u plz tell me how to do it? I'm writing this application in linux enviroment.
Re: disable ALT+CTRL+DEL!!!!
Qt doesn't support such a feature. Maybe because it's Windows specific?
Re: disable ALT+CTRL+DEL!!!!
I'm not sure but maybe you could install a filter on QEvent::keypress event
Re: disable ALT+CTRL+DEL!!!!
You can't filter CTRL+ALT+DEL, as it's the sequence to ensure you are using an anthentic login prompt, rather than what could be a trojan prompt.
Re: disable ALT+CTRL+DEL!!!!
Quote:
Originally Posted by
Corinzio
Thank you very much for reply.
I tried like this.
Code:
ev.setAccepted(true);
But it is not working. Any other suggestion??
Re: disable ALT+CTRL+DEL!!!!
You need to call the underlying WinAPI. If you need special things of an operating system you have to use the underlying OS API (Windows => WinAPI, Linux ..., Mac OS ...)
As fatjuicymole has already been written, use:
Code:
#if defined(Q_WS_WIN)
SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, TRUE, &bOldState, 0);
#endif
Best Regards
NoRulez
Re: disable ALT+CTRL+DEL!!!!
Quote:
Originally Posted by
NoRulez
You need to call the underlying WinAPI. If you need special things of an operating system you have to use the underlying OS API (Windows => WinAPI, Linux ..., Mac OS ...)
As fatjuicymole has already been written, use:
Code:
#if defined(Q_WS_WIN)
SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, TRUE, &bOldState, 0);
#endif
Best Regards
NoRulez
Thank u very much. But i'm writing this application for linux o/s. any thing in linux to disable alt+ctrl+del key press event?:(
Re: disable ALT+CTRL+DEL!!!!
On linux you have to edit the file "/etc/inittab" and change from
Code:
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
to
Code:
# ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
After this you either boot the system or type on the console:
This could also be done with QFile, QRegExp and QProcess
Best Regards
NoRulez
Re: disable ALT+CTRL+DEL!!!!
Quote:
Originally Posted by
NoRulez
On linux you have to edit the file "/etc/inittab" and change from
Code:
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
to
Code:
# ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
After this you either boot the system or type on the console:
This could also be done with QFile, QRegExp and QProcess
Best Regards
NoRulez
Thank u NoRulez. I'll try in this way.