Re: [fltk.bugs] [HIGH] STR #2232: FLTK1/2 X11 keyboard handling broken if using a soft keyboard
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: 2.0-current Fix Version: 2.0-current Fixed in Subversion repository. I'll close this STR on Matt's behalf - Matt, if you see any problems cropping up, feel free to re-open this, but otherwise this has been solved, from my own tests. Link: http://www.fltk.org/str.php?L2232 Version: 2.0-current Fix Version: 2.0-current ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
Re: [fltk.bugs] [HIGH] STR #2232: FLTK1/2 X11 keyboard handling broken if using a soft keyboard
[STR Closed w/Resolution] Link: http://www.fltk.org/str.php?L2232 Version: 2.0-current Fix Version: 2.0-current Link: http://www.fltk.org/str.php?L2232 Version: 2.0-current Fix Version: 2.0-current ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
Re: [fltk.bugs] [HIGH] STR #2232: FLTK1/2 X11 keyboard handling broken if using a soft keyboard
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: 2.0-current Tested this under FLTK2 and the bug no longer exists - Matt, it looks like you fixed this a while back. Since this was your fix, are you happy if this STR is closed? Link: http://www.fltk.org/str.php?L2232 Version: 2.0-current ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
Re: [fltk.bugs] [HIGH] STR #2232: FLTK1/2 X11 keyboard handling broken if using a soft keyboard
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 OK, I just committed a fix that will hopefully solve both issues. Please verify that this is functional, so I can close this bug. I don't have an X11 machine, so I can not event verify that the syntax is correct. Link: http://www.fltk.org/str.php?L2232 Version: 1.3-current ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
Re: [fltk.bugs] [HIGH] STR #2232: FLTK1/2 X11 keyboard handling broken if using a soft keyboard
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 can confirm that it's syntactically correct, I just compiled it on ubuntu 9.04. However, I can't test if it solves the problem. One thing I tested though: in test/editor key repetitions seem to work as they should, so there seems to be no regression for normal key handling at least. Link: http://www.fltk.org/str.php?L2232 Version: 1.3-current ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
Re: [fltk.bugs] [HIGH] STR #2232: FLTK1/2 X11 keyboard handling broken if using a soft keyboard
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 Matt, I just tested the updated fltk1.3, and it seems to work with the type morning script attached to this bug, so softkeyboard support is fixed. Thanks. I didn't try with any games since I don't know what to look for. Could you also apply a similar change to fltk2? I'm attaching a patch that does this. Link: http://www.fltk.org/str.php?L2232 Version: 1.3-current ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
Re: [fltk.bugs] [HIGH] STR #2232: FLTK1/2 X11 keyboard handling broken if using a soft keyboard
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 Link: http://www.fltk.org/str.php?L2232 Version: 1.3-currentIndex: src/x11/run.cxx === --- src/x11/run.cxx (revision 6965) +++ src/x11/run.cxx (working copy) @@ -1236,15 +1236,6 @@ int fl_actual_keysym; -extern C { - static Bool fake_keyup_test(Display*, XEvent* event, char* previous) { - return - event-type == KeyPress - event-xkey.keycode == ((XKeyEvent*)previous)-keycode - event-xkey.time == ((XKeyEvent*)previous)-time; - } -} - // this little function makes sure that the stylus related event data // is useful, even if no tablet was discovered, or the mouse was used to // generate a PUSH, RELEASE, MOVE or DRAG event @@ -1667,15 +1658,6 @@ goto GET_KEYSYM;} case KeyRelease: { -// Stupid X sends fake key-up events when a repeating key is held -// down, probably due to some back compatability problem. Fortunatley -// we can detect this because the repeating KeyPress event is in -// the queue, get it and execute it instead: -XEvent temp; -if (XCheckIfEvent(xdisplay,temp,fake_keyup_test,(char*)(xevent))){ - xevent = temp; - goto KEYPRESS; -} set_event_xy(false); unsigned keycode = xevent.xkey.keycode; fl_key_vector[keycode/8] = ~(1 (keycode%8)); ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
Re: [fltk.bugs] [HIGH] STR #2232: FLTK1/2 X11 keyboard handling broken if using a soft keyboard
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 For completeness, i just posted patches (for fltk 1.3 and 2.0) to disable the queue-modifying behavior that causes the above-described bug Link: http://www.fltk.org/str.php?L2232 Version: 1.3-current ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
Re: [fltk.bugs] [HIGH] STR #2232: FLTK1/2 X11 keyboard handling broken if using a soft keyboard
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 discovered that an identical bug existed in QT until very recently. Maybe this will help shed light on the original reasoning: http://lists.trolltech.com/qt-interest/2008-10/thread00773-0.html Link: http://www.fltk.org/str.php?L2232 Version: 1.3-current ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
Re: [fltk.bugs] [HIGH] STR #2232: FLTK1/2 X11 keyboard handling broken if using a soft keyboard
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 Interesting. I am sure a specific X11 client has caused this issue. I have no idea why it was important to differentiate a repeat from a press/release/press cycle, but Mike may clear this up. The code is basically OK and checks the even time as well, but in rare case (in particular, if keyboard input does not come from a human, but is generated by a program), time resolution may not be enough. I do not see a way to keep the patch and solve the new problem in the same code. Maybe Mike can explain why this was needed (and if we can remove it). Link: http://www.fltk.org/str.php?L2232 Version: 1.3-current ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
Re: [fltk.bugs] [HIGH] STR #2232: FLTK1/2 X11 keyboard handling broken if using a soft keyboard
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 Link: http://www.fltk.org/str.php?L2232 Version: 1.3-current#include stdio.h #include Xlib.h #include XTest.h int main(void) { Display *display; int i; KeyCode keycode; /* Connect to the server specified in the DISPLAY evironment variable */ display = XOpenDisplay(NULL); if (display == NULL) { fprintf (stderr, Cannot connect to X server %s.\n, XDisplayName(NULL)); return; } if (!XQueryExtension (display, XTEST, i, i, i)) { fprintf (stderr, Extension XTest unavailable on display '%s'.\n, XDisplayName(NULL)); XCloseDisplay (display); return; } unsigned char keycodes[] = {0x3a, 0x20, 0x1b, 0x39, 0x1f, 0x39, 0x2a, 0x41}; for(i=0; isizeof(keycodes); i++) { XTestFakeKeyEvent(display, keycodes[i], 1, 0); XTestFakeKeyEvent(display, keycodes[i], 0, 0); } XCloseDisplay (display); } ___ fltk-bugs mailing list fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs
[fltk.bugs] [HIGH] STR #2232: FLTK1/2 X11 keyboard handling broken if using a soft keyboard
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 fltk-bugs@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-bugs