public inbox for cygwin-xfree@sourceware.org help / color / mirror / Atom feed
From: "Young, George" <George.Young@pco-bcp.gc.ca> To: <cygwin-xfree@cygwin.com> Subject: RE: Using the Canadian Multilingual Standard keyboard with WindowsXP Date: Fri, 16 Jul 2010 17:13:00 -0000 [thread overview] Message-ID: <6B9C55F15278D64198962D45C8AA3CCA02B4B33B@BCL4EXC4.b.net> (raw) In-Reply-To: <4C4066F3.3050207@dronecode.org.uk> 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 610937742 [610937.742] winSendKeyEvent: dwKey: 28, fDown: 1, nEvents 2 [610937.802] winTopLevelWindowProc - Message WM_KEYUP [610937.802] hwnd 0xa0150 wParam 0xd lParam 0xc01c0001 timestamp 610937802 [610937.802] winWindowProc - Message WM_KEYUP [610937.802] hwnd 0x700d2 wParam 0xd lParam 0xc01c0001 timestamp 610937802 [610937.802] winTranslateKey: wParam 000d lParam c01c0001 timestamp 610937802 [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 610941938 [610941.938] winWindowProc - Message WM_KEYDOWN [610941.938] hwnd 0x700d2 wParam 0x12 lParam 0x21380001 timestamp 610941938 [610941.938] winTranslateKey: wParam 0012 lParam 21380001 timestamp 610941938 [610941.938] winSendKeyEvent: dwKey: 105, fDown: 1, nEvents 2 [610942.018] winTopLevelWindowProc - Message WM_SYSKEYUP [610942.018] hwnd 0xa0150 wParam 0x11 lParam 0xe01d0001 timestamp 610942018 [610942.018] winWindowProc - Message WM_SYSKEYUP [610942.018] hwnd 0x700d2 wParam 0x11 lParam 0xe01d0001 timestamp 610942018 [610942.018] winTopLevelWindowProc - Message WM_KEYUP [610942.018] hwnd 0xa0150 wParam 0x12 lParam 0xc1380001 timestamp 610942018 [610942.018] winWindowProc - Message WM_KEYUP [610942.018] hwnd 0x700d2 wParam 0x12 lParam 0xc1380001 timestamp 610942018 [610942.018] winTranslateKey: wParam 0012 lParam c1380001 timestamp 610942018 [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 YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: 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: XFilterEvent returns: False For the dead-cedilla problem, the server is started with %RUN% XWin -multiwindow -clipboard -silent-dup-error -xkblayout ca -xkbvariant multix -xkbmodel pc104 %RUN% xterm +tb -e /usr/bin/bash -l and I'm just typing in the xterm window. Immediately afer starting the server, RtCtrl = c gives c. After running some other application (e.g. xev, xterm +tb), it starts giving ç. And sometimes just to tease, it gives ç immediately upon startup. In any event, this patch seems to work as well as the last one, and it doesn't visibly impact the WinXP language selector thingie. So again, good stuff. Regards, George. -----Original Message----- From: Jon TURNEY [mailto:jon.turney@dronecode.org.uk] Sent: July 16, 2010 10:05 AM To: cygwin-xfree@cygwin.com Cc: Young, George Subject: Re: Using the Canadian Multilingual Standard keyboard with WindowsXP On 13/07/2010 20:30, Young, George wrote: > I tried the patch and am very impressed. My WinXP was set up with > English-Canada and 2 keyboards, Canadian Multilingual Standard and US. > When I ran the cygwin patch, it added English-US with a US Keyboard, > 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 correctly and trying to work out why the code to discard the spurious Ctrl-L key events isn't always working (it works fine for me) I've uploaded another build at [1] which tries that, with lots of extra debugging built in. I wonder if you could check if Ctrl-R deadkeys work correctly 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 > 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 > dead-cedilla (RtCtrl and =) then c, it just gives c. If I then run xev > and stop it, the dead keys start to work and it gives ç. I'm afraid I can't reproduce this, I always get a ç, but I may not be doing 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 > [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 > 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, >> 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 > (rather than the more normal VK_CONTROL) which isn't in the mapping > table to ignore the VK code and use the scan code. > > 2) Windows generates an additional Ctrl-L key event before AltGr key > event for international keyboard layouts. There is code in the X > server to try to identify and discard these extra events, but this > doesn't seem to be working in your case (and there have been other > reports of that) > > > I don't see why we can't just always load the US keyboard layout as > all we care about are scan codes: Patch to follow which adds a flag > to do that and turn it on for Japanese (which already does that) and > Canadian Multilingual Standard. > > I've also added a keycode mapping for VK_OEM_8 in case that ever > 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 > correctly generate ISO_Level3_Shift for AltGr and ISO_Level5_Shift for > Ctrl-R in the multix layout. Perhaps you could try it out and see if it works 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 > Multilingual Standard, cygwin doesn't get the RightAlt and > RightControl inputs", whereas this xev output seems to demonstrate > 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/
prev parent reply other threads:[~2010-07-16 17:13 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-06-03 20:17 Using the Canadian Multilingual Standard keyboard with Windows XP Young, George 2010-07-01 14:49 ` Jon TURNEY 2010-07-02 13:27 ` Using the Canadian Multilingual Standard keyboard with WindowsXP Young, George 2010-07-13 18:41 ` Jon TURNEY 2010-07-13 18:53 ` [PATCH] Fixes for Canadian Multilingual Standard keyboard layout handling Jon TURNEY 2010-07-13 19:30 ` Using the Canadian Multilingual Standard keyboard with WindowsXP Young, George 2010-07-16 14:04 ` Jon TURNEY 2010-07-16 17:13 ` Young, George [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=6B9C55F15278D64198962D45C8AA3CCA02B4B33B@BCL4EXC4.b.net \ --to=george.young@pco-bcp.gc.ca \ --cc=cygwin-xfree@cygwin.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).