From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18701 invoked by alias); 10 Jan 2012 09:47:57 -0000 Received: (qmail 18687 invoked by uid 22791); 10 Jan 2012 09:47:56 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mailout-de.gmx.net (HELO mailout-de.gmx.net) (213.165.64.22) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Tue, 10 Jan 2012 09:47:36 +0000 Received: (qmail invoked by alias); 10 Jan 2012 09:47:33 -0000 Received: from bastian.ppi.de (EHLO [192.168.103.48]) [194.180.18.1] by mail.gmx.net (mp024) with SMTP; 10 Jan 2012 10:47:33 +0100 Message-ID: <4F0C0934.7010708@gmx.de> Date: Tue, 10 Jan 2012 09:47:00 -0000 From: Oliver Schmidt User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: cygwin-xfree@cygwin.com Subject: Re: considering modifier keys after gaining focus References: <4E4A8D56.6010704@gmx.de> <4F09B4D4.4070905@gmx.de> <4F0AF463.5050707@dronecode.org.uk> <4F0B2DC8.9030706@gmx.de> In-Reply-To: <4F0B2DC8.9030706@gmx.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com X-SW-Source: 2012-01/txt/msg00010.txt.bz2 Hi, On 1/9/2012 7:11 PM, Oliver Schmidt wrote: > NEdit, press Ctrl+N for a new window, hold the Ctrl key and press S > (i.e. Ctrl+S) for saving. For the above NEdit example you have to disable the entry "Preferences / Default Settings / Tabbed Editing / Open File In New Tab" from NEdit's menu bar. Otherwise Ctrl+N will not open a new window. Of course every keyboard driven program that opens new windows with keyboard shortcuts will have problems with lost modifier key state. Moreover, if using my patch for "programmatically raising top level windows" ( http://cygwin.com/ml/cygwin-xfree/2011-08/msg00034.html ) the problem also occurs if a application raises windows by keyboard shortcuts. > I will try using GetKeyState tomorrow. I just wanted to be sure to get > the current key state when the window gets the focus. Ok, I tried using "GetKeyState" instead of "GetAsyncKeyState" and it also works. So it seems to be a good idea to switch to "GetKeyState". Best regards, Oliver -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/