Thank you so much. I need know the state of keyboard as fast as I can in fltk. So I think get_key is what I need.
> Sparkaround wrote: > > > But it is strange that Fl::get_key can still detect the input correctly > > when DELAY is 0.001. > > That's maybe not as strange as you think. I'm not an X11 expert, but this is > probably some out-of-band handling of a special function. > > FLTK is (as all GUI's) event driven, and there is some event queue handled by > the OS or some low level layer (like X11). Now, imagine that there are 100 > drawing events in the event queue, and you press a key. This will be event > #101 > in the queue. FLTK would need to work its way through 100 events and call > drawing functions that result in X server actions. After that, it will process > your key press event. > > OTOH, Fl::get_key() will query the X server immediately and thus circumvent > the > event queue. Your key press will be processed in an asynchronous way, which > would normally be *bad*, but in this case (just to stop the program) it is > maybe > the intended behavior. > > Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

