From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20876 invoked by alias); 18 Apr 2010 21:09:57 -0000 Received: (qmail 20865 invoked by uid 22791); 18 Apr 2010 21:09:56 -0000 X-SWARE-Spam-Status: No, hits=0.3 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW,TW_KB,TW_XK 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; Sun, 18 Apr 2010 21:09:51 +0000 Received: from 213-152-38-55.dsl.eclipse.net.uk (HELO [192.168.0.11]) ([213.152.38.55]) by smtpout.karoo.kcom.com with ESMTP; 18 Apr 2010 22:09:49 +0100 Message-ID: <4BCB752B.3010307@dronecode.org.uk> Date: Sun, 18 Apr 2010 21:15:00 -0000 From: Jon TURNEY Reply-To: cygwin-xfree@cygwin.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: cygwin-xfree@cygwin.com CC: chris.bird@ctsu.ox.ac.uk Subject: Re: Multimedia keys interpreted as alphabetic keys References: <4BC5D33D.2000205@ctsu.ox.ac.uk> In-Reply-To: <4BC5D33D.2000205@ctsu.ox.ac.uk> 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: 2010-04/txt/msg00057.txt.bz2 On 14/04/2010 15:37, Chris Bird wrote: > I wonder if anyone could shed some light on this minor problem I have: > > I'm using Cygwin/X as my X client for several linux boxes at work. > Everything's working fine (after some tweaking), but there is one small > thing I find very annoying: > > The multimedia keys on my keyboard generate keypresses as though they > were normal keys. Specifically, Play/Pause generates a 'g', volume up > generates 'c', volume down generates 'b', and mute generates 'd'. The > keyboard is a logitech Internet 350. As I listen to music all day to > keep my sanity, and occasionally need to alter the volume or stop or > mute the track to join in a conversation in the office (or stop driving > other people mad with my relentless beats!), I often find these > keypresses being entered into whatever program I'm working on. Not ideal. > > I used xev to find out what keycodes were being generated by these keys, > and by the keys the output would suggest is being pressed, ie. g, c, b, > and d, expecting to find different keycodes perhaps being mapped to the > same keysyms, so I could alter .Xmodmap to assign them to XF86Play, etc. > But I found that they were exactly the same, as if Cygwin was > interpreting them as the same keys at some very basic level, whereas > Windows can tell the difference between pressing g (outputs a 'g') and > pressing Play/Pause (it plays or pauses the current track in my media > player). Here is the output from xev when pressing Play/Pause, then g: > [snip] > > They both output 'keycode 42 (keysym 0x67, g)'. I tried various settings > in the arguments to XWin, to try to enable multimedia keys, and set the > model of my keyboard and layout correctly: > > %RUN% XWin -multiwindow -clipboard -silent-dup-error -xkbmodel > logitech_base > REM -xkbvariant extd > REM -xkbmodel logii350 > REM -xkblayout gb > > but none of these made any positive difference, in fact one of them (I > can't remember which), actually disabled some other keys (e.g. the arrow > keys). > > This behaviour doesn't happen in non-X Cygwin. I tried using Xming get > some ideas as suggested in this similar-looking post > > http://sourceware.org/ml/cygwin-xfree/2004-12/msg00249.html > > ('Xming.exe :1 -multiwindow -logverbose 10'), and got no useful messages > about the keyboard. > > Has anyone got a clue what's going on? Hope someone can help. Thanks for the clear problem report. After doing a bit of testing, the issue here seems to be that XWin doesn't know to generate the correct X keycodes for these multimedia keys, so this is a bug in XWin, not a problem with the XKB layout selected. I've added some some entries to the table which translates Windows Virtual Keycodes into X keycodes which hopefully fixes this. Perhaps you could try out the test build I have uploaded at [1] and see if that resolves this problem for you? I've also turned on a bit more debug, so even if this doesn't work correctly, -logverbose should indicate a bit more clearly what's going on... [1] ftp://cygwin.com/pub/cygwinx/XWin.20100418-git-9594fb420a063608.exe.bz2 -- Jon TURNEY Volunteer Cygwin/X X Server maintainer -- 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/