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