Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.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.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'typing': 0.04; "(i'm": 0.09; 'ah,': 0.09; 'am,': 0.12; 'gui': 0.13; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:Detecting': 0.16; '\xa0for': 0.16; '\xa0this': 0.16; 'wrote:': 0.16; 'subject:Windows': 0.18; 'received:209.85.210.174': 0.18; 'received:mail-iy0-f174.google.com': 0.18; 'trying': 0.21; 'detect': 0.21; 'header:In-Reply-To:1': 0.22; '(or': 0.23; 'sep': 0.23; 'sat,': 0.28; 'correct': 0.28; 'message-id:@mail.gmail.com': 0.29; 'certainly': 0.32; 'it.': 0.33; 'there': 0.33; 'to:addr :python-list': 0.33; "i've": 0.34; 'someone': 0.34; 'focus': 0.34; 'doing': 0.36; 'example,': 0.37; 'but': 0.37; 'some': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'program,': 0.38; 'subject:: ': 0.39; 'window': 0.39; 'event': 0.39; 'to:addr:python.org': 0.39; 'thinking': 0.40; 'more': 0.60; 'interest': 0.65; 'easy.': 0.67; 'lost': 0.68; 'anything,': 0.73; 'hijack': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=nMqTSQ9fj0lryCYCn6Q6HwdakMkP6fm0JEwCwQ+BpfE=; b=B4Jj9t2+wiS4kNbIgMjDEB4NcfDuXSD5Ny8fTQrJaCarN96tPIbU0xR8HzIUBeXvs5 oYCYpM1U7P1VPLFf2FdMtPBogarutianTvKqSSUz2VnHxqDK8s0BYQejc/qjroeuizr0 cRTwA9JAg3wxjmxtHfS7txUu+gyQ4YphvyyJI= MIME-Version: 1.0 In-Reply-To: References: <6e602a19-8cca-4924-bd95-df08615662d2@c8g2000prn.googlegroups.com> Date: Sat, 3 Sep 2011 07:47:54 +1000 Subject: Re: Detecting Ctrl-Alt-Del in Windows From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1315000077 news.xs4all.nl 2538 [2001:888:2000:d::a6]:38131 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:12676 On Sat, Sep 3, 2011 at 2:26 AM, Den wrote: > I've been doing some more thinking on what I want. =A0This may be a > better explanation. =A0Is there a way of detecting if my program has > lost "focus" (I'm not sure the correct term)? =A0For example, if someone > is typing in my program, but some other program takes control (or CAD > has been pressed) I would like simply to log that. =A0I have no interest > in trying to hijack or interfere with anything, simply log it. Ah, then yes most definitely! If you're writing a GUI program, a LostFocus event is a normal thing to be able to catch. Now, if you're writing a console program, that mightn't be so easy. But certainly you can detect loss of focus to any window that you control. ChrisA