Using the Canadian Multilingual Standard keyboard with WindowsXP

Young, George
Tue Jul 13 19:30:00 GMT 2010

Hello Jon,

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.

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 ç.

Good stuff,
George R. Young

-----Original Message-----
From: Jon TURNEY [] 
Sent: July 13, 2010 2:41 PM
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 :-)


> -----Original Message-----
> On 03/06/2010 21:17, Young, George wrote:
>> Using Windows XP and cygwin started with the command %RUN% XWin 
>> -multiwindow -clipboard -silent-dup-error -xkblayout ca -xkbvariant 
>> multix -xkbmodel pc104
>> If the Windows keyboard is set to US, cygwin works fine. If the 
>> Windows keyboard is set to Canadian Multilingual Standard, cygwin 
>> doesn't get the RightAlt and RightControl inputs.
> I couldn't reproduce this.  Checking with xev, the right alt and right 
> control keys generate key events when the Windows keyboard layout is 
> Canadian Multilingual Standard, although it seems that right control 
> generates the same X keysym as left control with that layout for some 
> reason.
> Can you clarify how you are checking for the keypresses?
> Please attach your /var/log/XWin.0.log as well.

Volunteer Cygwin/X X Server maintainer

Unsubscribe info:
Problem reports:

More information about the Cygwin-xfree mailing list