Re: [Tk] Double, Triple, Quadruple, <i><d><d><q><d>
- From: rugger@xxxxxxxxxxxx (Kip Rugger)
- Date: 20 Apr 2006 13:08:52 -0500
Sektor van Skijlen <ethouris@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
During reading about events in Tk, I found an interresting thing.
The "double mouse click" is implemented with a generic mechanism, that is, not
only double and not only mouse click. I can even bind an event to an
immportal's password in DOOM by using <i><d><d><q><d> as the event specifier.
Great. :) However, in order to be treated as one event, the time interval
between sub-events must not exceed some specified value.
But window system managers have their own settings about the time between two
mouse clicks to be still treated as a double-click.
So, my question is: where is the time interval for these events taken from on
particular systems? Is that taken from, for example, double-mouse-click
interval settings on Windows? What about other window-systems, like KDE? If
not, where is it taken from?
The Tk bind facility is largely modeled on a similar facility in X,
namely the Xt Translation Manager. But not exactly :)
Your example of bind . <i><d><d><q><d> { whatever } does not involve
any timers: it works pretty much as in DOOM.
For mouse clicks, you do have timers, but only for the Double- etc
events.
In X, the time interval between multi-clicks is a property of the
application. Different apps can use different values, although that
is almost surely a bad idea. A default value to use can be
distributed through the X resource system using the "multiClickTime"
resource.
Tk processes X resources, but does not act on multiClickTime.
Instead, for all platforms it uses 500 ms. You can't change this
value.
.
- Follow-Ups:
- Re: [Tk] Double, Triple, Quadruple, <i><d><d><q><d>
- From: Donal K. Fellows
- Re: [Tk] Double, Triple, Quadruple, <i><d><d><q><d>
- From: Sektor van Skijlen
- Re: [Tk] Double, Triple, Quadruple, <i><d><d><q><d>
- References:
- [Tk] Double, Triple, Quadruple, <i><d><d><q><d>
- From: Sektor van Skijlen
- [Tk] Double, Triple, Quadruple, <i><d><d><q><d>
- Prev by Date: Re: ANNOUNCE: InstallJammer Multiplatform Installer, version 1.0b2
- Next by Date: Re: how to escape dashes in a variable?
- Previous by thread: [Tk] Double, Triple, Quadruple, <i><d><d><q><d>
- Next by thread: Re: [Tk] Double, Triple, Quadruple, <i><d><d><q><d>
- Index(es):
Relevant Pages
|