|
From: Ethan A M. <merritt@u.washington.edu> - 2006-06-04 15:54:41
|
On Sunday 04 June 2006 02:31 am, Petr Mikulik wrote: > > I would prefer that this hotkey works always. Could this be organized? So far no one has suggested how this can be done. > Are not the messages from gnuplot_x11 delivered always to gnuplot? Yes, but not immediately. It's the same old problem: gnuplot mixes the input streams from the keyboard and the current terminal into a single queue. Thus both terminal events and keyboard input are read via term->waitforinput(). If you change the terminal, you change the input routine and no longer read events from the previous terminal. The events are not lost; they are delivered eventually when the terminal is set back to the original type and term->waitforinput() is next called. > Considering 'q' hotkey: I propose to allow its rebounding, and in this case > gnuplot_x11 to close itself, without dispatching this message to gnuplot. The problem for 'q' is slightly different. Key bindings are handled by gnuplot itself; the terminal drivers do not know about them. So then the problem is how do you tell gnuplot_x11 that it should send 'q' as an event to the main program rather than exiting? > When binding 'q' or init of terminal, gnuplot should write to terminal 'use > key "x" to quit'. In the case of x11, gnuplot does not know this. gnuplot_x11 reads it from an X resource. -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |