This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
RE: Duplicate Keystrokes - Again, Again!
- From: Jean-Claude Gervais <jc dot gervais at videotron dot ca>
- To: cygwin-xfree at cygwin dot com
- Date: Mon, 07 Apr 2003 10:17:54 -0400
- Subject: RE: Duplicate Keystrokes - Again, Again!
- Reply-to: cygwin-xfree at cygwin dot com
Harold, guys,
I'm just about certain that the repeated keys are caused by latency, not by
load:
When I use Netmeeting to control a machine running Cygwin-XFree and I see
the duplicated-keystroke problem often.
When this happens, almost without exception, it is NOT the machine running
Cygwin-XFree nor the machine running Linux who are under high load. Even the
machine I am using to remote control is not under heavy load.
It is rather, without fail, when the telecommunications link the Netmeeting
session is routed over is running at capacity.
Is it a workable hypothesis to suggest that what might be happening is this:
A keydown message is arriving at Cygwin-XFree, and it takes too long for a
key-up message to arrive, so Windows generates another key event?
I seem to remember that Windows works like this -
WM_KEYDOWN
WM_CHAR
if a pause of X milliseconds occurs here, Windows does this -
WM_KEYDOWN
WM_CHAR
WM_KEYDOWN
WM_CHAR
... More WM_KEYDOWNs and WM_CHARs until a WM_KEYUP arrives.
WM_KEYUP
The interesting part is that both the WM_KEYDOWN and WM_CHAR messages have a
flag in them called 'fRepeat' that will be set to 1 (true) if this is the
case.
Anyhow, I downloaded the code for Cygwin's X server and I will spelunk it
soon.
I'd appreciate any ideas in the meantime.
-----Original Message-----
From: cygwin-xfree-owner at cygwin dot com [mailto:cygwin-xfree-owner at cygwin dot com]On
Behalf Of Harold L Hunt II
It could be the delay between the
down message and the up message that is causing this. But, like I said,
I looked through almost all of the code and nowhere could I find a part
that looped and created extra keypresses in the X Client.