November 10th, 2008

How slow do you have to slow-double-click for it to be a rename?

In many parts of the system, you can rename an item by first selecting it, then clicking on its name. The selection step is typically done by clicking on the item, which creates the risk that your second click will be interpreted as a double-click rather than as a rename click. How slow do you have to slow-double-click for it to be a rename?

Slow enough that it’s not a regular double-click.

The double-click time is set in the mouse control panel; I believe the current default is 500 milliseconds. If your two clicks are within a half second of each other, they will be treated as a double-click. If they occur more than a half second apart, then they are treated as two clicks.

Okay, I lied.

If you think about it, the algorithm above misses a case: Suppose you click on an item, wait two seconds, and then double-click it. That second click (the first in the double-click) shouldn’t initiate a rename because it’s really part of a double-click.

Therefore, the rule really is that a click on a selected item with no other clicks within the double-click time, either before or after is treated as a rename.

That’s why the answer to commenter boxmonkey’s question “Who renames files by slowly double clicking?” is “Nobody.” It’s like asking, “Who makes a telephone call by picking up the receiver and holding the hook down for three seconds before beginning to dial, then holding the hook for another three seconds when the call is over?” Holding the hook isn’t part of dialing process. The purpose of holding the hook is to ensure that when you ultimately go off hook, the operation won’t be interpreted as a flash. You don’t consider it part of the phone dialing process; it’s just a way to separate the next call from the previous one.

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.