Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.067 X-Spam-Evidence: '*H*': 0.87; '*S*': 0.00; 'keys.': 0.16; 'mode.': 0.16; 'obviously,': 0.16; 'reboot': 0.16; 'subject:Detecting': 0.16; 'question.': 0.16; 'wrote:': 0.16; 'linux': 0.17; 'subject:Windows': 0.18; 'trying': 0.21; 'detect': 0.21; 'header :In-Reply-To:1': 0.22; 'code.': 0.26; "i'm": 0.27; 'handled': 0.28; 'feature,': 0.30; 'os,': 0.30; 'typically': 0.32; 'probably': 0.33; 'there': 0.33; 'to:addr:python-list': 0.33; 'header:User-Agent:1': 0.34; 'nobody': 0.34; 'machine': 0.37; 'but': 0.37; 'configured': 0.38; 'some': 0.38; 'subject:: ': 0.39; 'received:192': 0.39; 'window': 0.39; 'goes': 0.39; "there's": 0.39; 'to:addr:python.org': 0.39; 'might': 0.40; "it's": 0.40; 'straight': 0.63; 'manager.': 0.64; 'received:62': 0.70; 'from:addr:t': 0.84; 'interrupt': 0.84 Date: Fri, 02 Sep 2011 12:01:34 +0200 From: Thomas Jollans User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Detecting Ctrl-Alt-Del in Windows References: <6e602a19-8cca-4924-bd95-df08615662d2@c8g2000prn.googlegroups.com> In-Reply-To: <6e602a19-8cca-4924-bd95-df08615662d2@c8g2000prn.googlegroups.com> X-Enigmail-Version: 1.3.1 OpenPGP: id=5C8691ED Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1314957682 news.xs4all.nl 2484 [2001:888:2000:d::a6]:35513 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12630 On 01/09/11 17:52, Den wrote: > Obviously, this is a windows-based question. I know that Ctrl-Alt-Del > is handled deep inside the OS, and I'm not trying to interrupt that. > But is there some way to detect that a C-A-D has been pressed? > > Also, is there a corresponding key-sequence in Mac and Linux? And how > might one detect those too? On Linux Ctrl+Alt+Delete is typically configured to reboot the machine when in console mode. In X11 (graphical), as far as I know, it's no different than other keys. To catch it globally, you'd probably have to go through the individual window manager. As m'colleague Nobody mentions, there's also the SysRq feature, but that always goes straight to the kernel and is, like Ctrl+Alt+Delete on Windows, impossible to handle in userspace code. Thomas