This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: key bounce problem


Stacey,

Stacey Campbell wrote:
Harold,


Duncan Cragg seems to have reported success using 'xset r off', but you may want to read the rest of that thread for clarification. Hmm... from my own comments I think I mentioned that XF86MISC isn't compiled in, so it wouldn't seem that 'xset r off' could actually do anything...


No xset 'r' args appear to work.  'xset q' shows that the server is
correctly registering 'xset r off' and it's definitely ignored.  I
think it's fine that XWin currently ignores this stuff since it's
(without looking at the source) probably doing the right thing by
talking directly to the Windows keyboard driver at the application level.


Hmm... Well, there are two opportunities to get hit by an automatic key repeat here:


1) Windows key repeats. This is where Windows notes that the duration of a key press connotes more than one key press and it sets the repeat count flag in the key press message to our application. We loop through the repeat count, sending a key press X event for each repeat. The other option here is that Windows will not group the key presses into a single message, but will instead keep sending the key press message interspersed with other messages.

2) X key repeats. This is disabled with 'xset r off'. Even though XF86MISC isn't compiled in it seems to work for users that have problems with this. The nature of this problem is that we send *one* key press event to X, but X interprets the duration between the key press event and the key release event as meaning that automatic repeats for the key should be generated. As you can see, this is a sort of double handling of key repeats since these sort of repeats are already handled by Windows. X key repeats cause problems in high-latency situations, such as when running a debug-compiled server with our slowest graphics engine (Native GDI, not yet finished) or over Windows Remote Desktop connections on slow links. This is the problem that users have complained about previously.

Everything that you have said, especially the fact that changing a Windows option seems to help, indicates to me that either you have a weird keyboard or keyboard driver that is causing Windows key repeats, or that for some reason you hold keys really long when running Cygwin/XFree86 :) I really can't imagine that you have problem (2) as described above, since the prescribed work-around doesn't do anything for you. Perhaps you have problem (1) and Cygwin/XFree86 could be one of only a few applications that actually pay attention to the Windows key repeat count in key press messages. I have no idea if most Windows apps use the key repeat counts like they are supposed to... some do, but I don't know if the majority do. This would explain why changing the keyboard setting in Windows seems to affect only Cygwin/XFree86.

Either way, I don't actually want 'xset r off', I really want something
like:

$ cat ~/.xserverrc :
exec /usr/X11R6/bin/X -ar1 500 :0


...which doesn't seem to work either.



As I have said many times, I can program X Servers, but I am a terrible X user. I have no idea what the intention of the above command-line parameters are.


I had asked for some help from our guru, Alan Hourihane, but I don't remember if he had any insight to offer me.


In a previous life I wrote X server support many ISA, VESA and PCI
graphics adapters.  I remember the keyboard-and-mouse-input guy in
our group being a weary "glass is half empty" type person when struggling
with these devices and everything that an X server is expected to do
with them.

Interesting. The keyboard and mouse input in our system is surprisingly easy... our main problem is getting X to keep its hands off of the events that we send it :)


Harold


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]