DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2232 Version: 1.3-current I'm seeing a problem with the low-level keyboard handling in both FLTK1 and FLTK2. If using a program that artificially generates X11 keystrokes to type any word with non-consecutive, repeated letters into an FLTK app, FLTK transposes the letters. An example of such a keystroke-generating application is a soft keyboard, such as those used on touchscreen phones. A keyboard that uses a dictionary to type a word-at-a-time types the letters in a quick succession, triggering this bug. I'm attaching 2 test programs to demonstrate the issue, one in C and another in Perl. Both use XTest to type "morning" (assuming a "standard" keyboard). This works fine when typing into an app not built with FLTK, but FLTK often produces "mornnig" instead. This is sensitive to timing, so the bug doesn't occur 100% of the time, but quite often on my computer. The cause of the issue is code in FLTK to handle key repeats. When a key is held down, X sends repeated press and release events. FLTK fights this by looking into the X event queue to detect this condition, and to pull out press events to process them earlier. Thus, the second "n" in "morning" moves up in the queue to produce the error. In FLTK1, this behavior was introduced in revision 2937 (this revision has no other changes). In FLTK2, almost-identical behavior was introduced in revision 2944. I must admit I don't understand why FLTK doesn't want to handle repeated press and release events that X generates. A quick test with that code pulled out didn't reveal any breakage, but I didn't try for very long. We can pull out this code permanently if the issue no longer exists (the code was written in 2003). Otherwise, we can make fake_keyup_test() smarter by preventing it from triggering if different keys are seen in the queue in-between the repeating keys. Link: http://www.fltk.org/str.php?L2232 Version: 1.3-current
type_morning.pl
Description: Binary data
_______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
