From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1141 invoked by alias); 16 Jul 2010 17:13:31 -0000 Received: (qmail 1126 invoked by uid 22791); 16 Jul 2010 17:13:29 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,TW_HW,TW_KB,TW_XK X-Spam-Check-By: sourceware.org Received: from mailin2.pco.gc.ca (HELO MAILIN2.pco.gc.ca) (198.103.111.115) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Jul 2010 17:13:23 +0000 Received: from av_spm2 ([192.168.73.121]) by MAILIN2.pco.gc.ca with InterScan Message Security Suite; Fri, 16 Jul 2010 13:32:23 -0400 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Using the Canadian Multilingual Standard keyboard with WindowsXP Date: Fri, 16 Jul 2010 17:13:00 -0000 Message-ID: <6B9C55F15278D64198962D45C8AA3CCA02B4B33B@BCL4EXC4.b.net> In-Reply-To: <4C4066F3.3050207@dronecode.org.uk> References: <6B9C55F15278D64198962D45C8AA3CCA02B4B2E8@BCL4EXC4.b.net> <4C2CAB16.1000009@dronecode.org.uk> <6B9C55F15278D64198962D45C8AA3CCA02B4B312@BCL4EXC4.b.net> <4C3CB352.6080605@dronecode.org.uk> <6B9C55F15278D64198962D45C8AA3CCA02B4B336@BCL4EXC4.b.net> <4C4066F3.3050207@dronecode.org.uk> From: "Young, George" To: 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-07/txt/msg00054.txt.bz2 Hello Jon, With this patch, Right Alt gives $ tail -f /var/log/XWin.0.log [610937.742] winWindowProc - Message WM_KEYDOWN [610937.742] hwnd 0x700d2 wParam 0xd lParam 0x1c0001 timestamp 610937742 [610937.742] winTranslateKey: wParam 000d lParam 001c0001 timestamp 6109377= 42 [610937.742] winSendKeyEvent: dwKey: 28, fDown: 1, nEvents 2 [610937.802] winTopLevelWindowProc - Message WM_KEYUP [610937.802] hwnd 0xa0150 wParam 0xd lParam 0xc01c0001 timestamp 6109378= 02 [610937.802] winWindowProc - Message WM_KEYUP [610937.802] hwnd 0x700d2 wParam 0xd lParam 0xc01c0001 timestamp 6109378= 02 [610937.802] winTranslateKey: wParam 000d lParam c01c0001 timestamp 6109378= 02 [610937.802] winSendKeyEvent: dwKey: 28, fDown: 0, nEvents 2 [610941.938] winTopLevelWindowProc - Message WM_KEYDOWN [610941.938] hwnd 0xa0150 wParam 0x11 lParam 0x1d0001 timestamp 610941938 [610941.938] winWindowProc - Message WM_KEYDOWN [610941.938] hwnd 0x700d2 wParam 0x11 lParam 0x1d0001 timestamp 610941938 [610941.938] winTopLevelWindowProc - Message WM_KEYDOWN [610941.938] hwnd 0xa0150 wParam 0x12 lParam 0x21380001 timestamp 610941= 938 [610941.938] winWindowProc - Message WM_KEYDOWN [610941.938] hwnd 0x700d2 wParam 0x12 lParam 0x21380001 timestamp 610941= 938 [610941.938] winTranslateKey: wParam 0012 lParam 21380001 timestamp 6109419= 38 [610941.938] winSendKeyEvent: dwKey: 105, fDown: 1, nEvents 2 [610942.018] winTopLevelWindowProc - Message WM_SYSKEYUP [610942.018] hwnd 0xa0150 wParam 0x11 lParam 0xe01d0001 timestamp 610942= 018 [610942.018] winWindowProc - Message WM_SYSKEYUP [610942.018] hwnd 0x700d2 wParam 0x11 lParam 0xe01d0001 timestamp 610942= 018 [610942.018] winTopLevelWindowProc - Message WM_KEYUP [610942.018] hwnd 0xa0150 wParam 0x12 lParam 0xc1380001 timestamp 610942= 018 [610942.018] winWindowProc - Message WM_KEYUP [610942.018] hwnd 0x700d2 wParam 0x12 lParam 0xc1380001 timestamp 610942= 018 [610942.018] winTranslateKey: wParam 0012 lParam c1380001 timestamp 6109420= 18 [610942.018] winSendKeyEvent: dwKey: 105, fDown: 0, nEvents 2 KeyPress event, serial 24, synthetic NO, window 0xa00001, root 0x101, subw 0x0, time 611127124, (353,21), root:(485,195), state 0x0, keycode 113 (keysym 0xfe03, ISO_Level3_Shift), same_screen Y= ES, XLookupString gives 0 bytes:=20 XmbLookupString gives 0 bytes:=20 XFilterEvent returns: False KeyRelease event, serial 27, synthetic NO, window 0xa00001, root 0x101, subw 0x0, time 611127184, (353,21), root:(485,195), state 0x80, keycode 113 (keysym 0xfe03, ISO_Level3_Shift), same_screen = YES, XLookupString gives 0 bytes:=20 XFilterEvent returns: False For the dead-cedilla problem, the server is started with=20 %RUN% XWin -multiwindow -clipboard -silent-dup-error -xkblayout ca -xkbvari= ant multix -xkbmodel pc104 %RUN% xterm +tb -e /usr/bin/bash -l and I'm just typing in the xterm window. Immediately afer starting the serv= er, RtCtrl =3D c gives c. After running some other application (e.g. xev, x= term +tb), it starts giving =E7. And sometimes just to tease, it gives =E7 = immediately upon startup. In any event, this patch seems to work as well as the last one, and it does= n't visibly impact the WinXP language selector thingie. So again, good stuff. Regards, George.=20 -----Original Message----- From: Jon TURNEY [mailto:jon.turney@dronecode.org.uk]=20 Sent: July 16, 2010 10:05 AM To: cygwin-xfree@cygwin.com Cc: Young, George Subject: Re: Using the Canadian Multilingual Standard keyboard with Windows= XP On 13/07/2010 20:30, Young, George wrote: > I tried the patch and am very impressed. My WinXP was set up with=20 > English-Canada and 2 keyboards, Canadian Multilingual Standard and US.=20 > When I ran the cygwin patch, it added English-US with a US Keyboard,=20 > and switched to that. Thanks for trying it out. Hmm... this is a rather unfortunate side-effect of loading the US keyboard = layout, and there doesn't seem to be a good way of preventing it appearing = in the language bar. I think maybe I should try the alternate approach of handling VK_OEM_8 corr= ectly and trying to work out why the code to discard the spurious Ctrl-L ke= y events isn't always working (it works fine for me) I've uploaded another build at [1] which tries that, with lots of extra deb= ugging built in. I wonder if you could check if Ctrl-R deadkeys work corre= ctly with that, and also if you could provide me with the output of 'tail -= f /var/log/XWin.0.log' and xev from pressing AltGr. > In cygwin, the RightAlt and RightControl do what they're supposed to=20 > do (almost). There still seems to be a small problem with dead key stuff. > > When I first run the cygwin server, and press the keys for=20 > dead-cedilla (RtCtrl and =3D) then c, it just gives c. If I then run xev= =20 > and stop it, the dead keys start to work and it gives =E7. I'm afraid I can't reproduce this, I always get a =E7, but I may not be doi= ng the right thing. Can you give me some more detailed steps about how you= are starting the Xserver, and the application you are typing into? [1] ftp://cygwin.com/pub/cygwinx/XWin.20100716-git-26e4d8f804b5cfdc.exe.bz2 > > Good stuff, George R. Young > > > -----Original Message----- From: Jon TURNEY=20 > [mailto:jon.turney@dronecode.org.uk] Sent: July 13, 2010 2:41 PM To: > cygwin-xfree@cygwin.com Cc: Young, George Subject: Re: Using the=20 > Canadian Multilingual Standard keyboard with WindowsXP > > On 02/07/2010 14:27, Young, George wrote: >> With WIN XP keyboard set to Canadian Multilingual Standard: Run xev,=20 >> press Right Alt > [xev output snipped] > > Thanks. This helps a lot in understanding the problem. > > There seem to be two things going on here: > > 1) In the Canadian Multilingual Standard layout, Ctrl-R is VK_OEM_8=20 > (rather than the more normal VK_CONTROL) which isn't in the mapping=20 > table to ignore the VK code and use the scan code. > > 2) Windows generates an additional Ctrl-L key event before AltGr key=20 > event for international keyboard layouts. There is code in the X=20 > server to try to identify and discard these extra events, but this=20 > doesn't seem to be working in your case (and there have been other=20 > reports of that) > > > I don't see why we can't just always load the US keyboard layout as=20 > all we care about are scan codes: Patch to follow which adds a flag=20 > to do that and turn it on for Japanese (which already does that) and=20 > Canadian Multilingual Standard. > > I've also added a keycode mapping for VK_OEM_8 in case that ever=20 > fails, and improved some logging related to the keyboard layout detection. > > I've also added the multix layout to the list of autodetected layouts. > > > I've uploaded a build with this patch applied [1]. This seems to=20 > correctly generate ISO_Level3_Shift for AltGr and ISO_Level5_Shift for=20 > Ctrl-R in the multix layout. Perhaps you could try it out and see if it w= orks for you? > > Although I am still a bit unclear as to what exactly doesn't work for you. > Originally you said "If the Windows keyboard is set to Canadian=20 > Multilingual Standard, cygwin doesn't get the RightAlt and=20 > RightControl inputs", whereas this xev output seems to demonstrate=20 > that the X server gets events, just not the right ones :-) -- 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/