From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21750 invoked by alias); 3 Aug 2011 13:15:49 -0000 Received: (qmail 21741 invoked by uid 22791); 3 Aug 2011 13:15:48 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtpout.karoo.kcom.com (HELO smtpout.karoo.kcom.com) (212.50.160.34) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Aug 2011 13:15:14 +0000 Received: from 213-152-38-55.dsl.eclipse.net.uk (HELO [192.168.0.8]) ([213.152.38.55]) by smtpout.karoo.kcom.com with ESMTP; 03 Aug 2011 14:15:12 +0100 Message-ID: <4E3949E0.6090306@dronecode.org.uk> Date: Wed, 03 Aug 2011 13:15:00 -0000 From: Jon TURNEY Reply-To: 'cygwin-xfree' User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20110714 Thunderbird/6.0 MIME-Version: 1.0 To: 'cygwin-xfree' CC: Paul Maier Subject: Re: AW: AltGr key mostly fires an additional CONTROL key References: <006301cc4fb3$2696d060$73c47120$@de> <4E36BED6.3070102@dronecode.org.uk> <000001cc5085$6b711fb0$42535f10$@de> In-Reply-To: <000001cc5085$6b711fb0$42535f10$@de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2011-08/txt/msg00004.txt.bz2 >> The actual issue here is that Windows apparently inserts a fake Ctrl-L >> keypress/release when AltGr is pressed/released (except when the keyboard >> layout is US). I have never found any documentation of this behavior, and >> I've no idea why it does this. >> >> There is some code in the X server which attempts to detect and discard these >> fake keypress/release events, but it not working reliably for some people has >> been reported a few times, but I've never been able to reproduce the problem >> or get to the bottom of what causes it. >> >> If you are willing to help, I've put together a test build with some extra >> debugging at [1]. If you could run that with '-logverbose 3' as before and >> attach the output, that would be helpful. >> >> [1] ftp://cygwin.com/pub/cygwinx/XWin.20110801-git-2d9f9305cb559907.exe.bz2 >> > no problem - here we go: > The logs are attached. > > This is what I did: > > 1. /bin/startxwin -- XWin.20110801-git-2d9f9305cb559907.exe -emulate3buttons 100 -logverbose 3 > 2. It took me more attempts than usual to reproduce it, therefore the interesting part will be at the end of the log. > 3. I manually killed the X-Server and took the log. > 4. XWin.0.log is the full log of the session. > 5. xev.txt: I have taken only the "interesting" part. > > My session in detail: > > I pressed several times AltGr and Q, nothing special, I get "@" (it doesn't happen always - just then and when). > I hold down AltGr for 2 seconds ... I play around. > Then I get into the bug: > I press AltGr and Q, then release both keys: I get CHAR 00. > I just hit key A and instead of "a" I get CHAR 01 = CONTROL-A. > I just hit key C and instead of "c" I get CHAR 03 = CONTROL-C. > Then I (first time) hit the real CONTROL key to unlock that situation. In the xev-log you see only(!) a ReleaseEvent at that point. > Then I press AltGr and Q again and I get CHAR HEX 40 = letter "@". > I hit key A and get "a". Thanks for the logs, that was very useful. I still can't reproduce this (although holding AltGr down to make it autorepeat seems the best way to try to do that). It is a timing issue with the keypress/release messages so it might be sensitive to CPU speed, or perhaps you have some software installed which looks at keypress/release messages and changes the timing? I've had a go at fixing it. Can you please try the build I've uploaded at [1] and see if it still shows the problem for you? [1] ftp://cygwin.com/pub/cygwinx/XWin.20110803-git-a493c0465e56ce0b.exe.bz2 -- 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/