How does Explorer determine the delay between clicking on an item and initiating an edit?


Ian Boyd wants to know why the specific value of 500ms was chosen as the edit delay in Windows Explorer.

Because it’s your double-click time.

Since the double-click action (execute) is not an extension of the single-click action (edit), Explorer (and more generally, list view) waits for the double-click timeout before entering edit mode so it can tell whether that first click was really a single-click on its own or a single-click on the way to a double-click.

If the timeout were shorter than the double-click time, then double-clicking an item would end up having the first click trigger edit mode and the second click selecting text inside the editor.

(If the timeout were longer, then everything would still work, but you would just have to wait longer.)

Ian says, “Through my testing it does not appear linked to configurable double-click timeout.” My guess is that Ian changed the double-click timeout not by calling Set­Double­Click­Time but by whacking a registry value directly. The values in the registry are loaded and cached at logon; you can update them all you want at runtime, nobody will care.

Comments (34)
  1. henke37 says:

    And here I guessed the correct answer (from just the title) for all the wrong reasons. My logic: "The doubleclick speed is used by windows to determinate how good the reflexes are of the user. This sounds like such a case." But in retrospect the correct logic is obvious, if you read the full question.

  2. Adam Rosenfield says:

    I have a short little program that just calls SendMessageTimeoutA(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_NORMAL, 5000, NULL) so I can whack registry keys for environment variables and have Explorer be aware of the changes I made.  It's much easier to automate than, say, asking users to click through a bunch of menus.

    I presume the same trick would work for changing the double-click timeout, though I haven't tried it.

    [Um, the double-click time is not an environment variable. If you want to automate it, then just call SetDoubleClickTime! -Raymond]
  3. Joshua Ganes says:

    Over time, I've grown to dislike double-click more and more. This seemingly small decision made many years ago is still plaguing developers. I would much rather a single click launch an application and a modifier be used to perform less frequent tasks such as editing. A great example of the problems this causes can be found within web applications where many users feel they need to double-click buttons to submit a form, which can result in performing the same action twice. Admittedly, this possibility still needs to be accounted for by the developer, but it would be nice if it were not the default user behavior.

  4. David Walker says:

    @Joshua:  You may be right — editing usually appears in the right-click menu — but what's to be done now?  The only think single-click does in Windows Explorer is to select an item, which is not very useful.  

    I realize that I am either double-clicking or right-clicking an object in order to do anything useful with it.  If you select an itme by single-clicking it, you have to do something else (a menu choice?) to do anything useful.

    Perhaps single-click should have launched an application and double-click should have selected it!  There would still be a delay to make sure your single-click is a single-click.

    Or, make the "single-click to execute, hover to select" option become the default.  I don't like that default because it's … not what I'm used to!  Which is almost circular.  

    I have seen many users double-click things on Web pages.  We'll just have to put up with Web pages that admonish the user to "click the button only once".  

  5. Karellen says:

    @Joshua – do you dislike the idea of double-click in general, or the use of double-click-to-launch/open/run on Windows Explorer/Desktop? Sounds like you just want your users to be used to environments which have configured single-click-to-launch.

    (I prefer single-click-to-launch, but also very much like the behaviour in edit boxes of single-click to place the cursor, double-click to select the word, triple-click to select the line)

  6. Adam Rosenfield says:

    [Um, the double-click time is not an environment variable. If you want to automate it, then just call SetDoubleClickTime! -Raymond]

    Yes, I know that — I'm suggesting whacking whatever registry value is used for the double-click time, then sending a WM_SETTINGCHANGE with an lParam of whatever registry key is used for that.  Of course SetDoubleClickTime would be preferred (or even SystemParametersInfo(SPI_SETDOUBLECLICKTIME)).

    [There is no WM_SETTINGCHANGE for "Go reread the double-click time" because WM_SETTINGCHANGE is a notification to applications that the window manager changed something, not a notification to the window manager to go change something. It's like trying to destroy a window by sending WM_DESTROY. -Raymond]
  7. SvenG says:

    @Joshua: not sure if you know this, but it's been possible to configure Windows Explorer to use a single click launch (and hover to select) since at least Windows 98 (I think it may have been available in the IE4 desktop update for Windows 95, even). Before Windows Vista, it was somewhat annoying to use because Explorer would wait for the double click time-out before doing anything just to prevent taking the action twice if you accidentally double-clicked anyway. As of Windows Vista, the action is instantaneous. The only caveat is that you have to be somewhat careful where you click to give the window focus, since that will launch an item if that's where you clicked.

    I've been using this setting for a long time, and vastly prefer it over the default double-click behaviour. It actually feels somewhat better for my RSI because there's less double-clicking going on.

  8. Joshua Ganes says:

    I am opposed to double-click as an event. It is non-intuitive and a difficult action to perform. For example, my own mother is often found pulling icons around instead of launching applications due to the difficulty in double-clicking while keeping the mouse reasonably still. I know that there are settings to control the double-click time and motion and I have adjusted them on her computer. This is of no use when she is using an unfamiliar system. I would prefer that the defaults were more friendly to those without precise motor skills.

    At this time, I know how strongly these concepts are baked in to Windows users. Updating this would require dragging users kicking and screaming into single-click land. This is not something most paying customers would want (unless they're into that sort of thing).

  9. voo says:

    The "single click starts application" is one of the first settings I always change when on a new linux install. There are just so many things I want to do that involve selecting an item but not executing it.

    What if I want to copy some files around? What if I just selected some item so that I can type the name of the one I'm really interested in? (works much better than scrolling around larger folders and scanning with the eyes)

    If the only thing I'm interested in is starting an application, I don't need the mouse at all – "win key + name + enter" will take care of that. No, when I'm in the explorer I have to do some administrative stuff.

  10. jader3rd says:

    "The values in the registry are loaded and cached at logon; you can update them all you want at runtime, nobody will care."

    That's one the reasons why I'm glad the Metro apps don't have registry access. The registry has to be kept in memory, so that way programs can access the registry values quickly. But not all programs do that. Now that there are a new class of programs which can't use the registry the OS can do a better job of keeping the data in memory that needs to be, and doesn't have to with the data that doesn't.

  11. @Joshua [Updating this would require dragging users kicking and screaming into single-click land.]

    This is exactly what WinRT/Metro accomplishes. :)

  12. Evan says:

    I should also say that my observation was for me personally; if you've got poor motor skills and have trouble double-clicking (heck, even I occasionally do, especially when trying to use a stylus) I could definitely see it going the other way. The setting is nice.

  13. Gabe says:

    I personally hate the way web pages are like a minefield. You never know what might happen just from moving your cursor around, or what action will happen when you're just trying to give the window focus by clicking on it. I find that the single-click mode in Explorer is almost as bad.

    BTW, in single-click mode, how do you select multiple items?

  14. @Gabe – the easy answer is to turn on "Use Checkboxes to select items" under Folder Options -> View -> Advanced

  15. Starting with Vista, you can no longer single click to rename/initiate an edit in the navigation pain.

  16. Douglas says:

    @Gabe (how do you select mutiple items in single-click mode?)

    Either with lasso-select or Ctrl+click (assuming Ctrl+click correctly did not execute the default verb). However, I agree that the double-click training users have undergone has been for the most part "bad". I cringe every time I watch users double-click buttons.

    My peeve with the double-click time is that tooltip delay is tied to it–What? I get annoyed when a tooltip disappears and I have not finished reading it. Let me see the tooltip until I move my mouse please.

  17. Antonio Rodríguez says:

    There is a rationale behind all this that makes it make sense, and it dates back to the development of the Macintosh. GUIs mimic the way people work: first take an object, then do something with it. So to put a text in bold, first select the text, then execute the Format->Bold command. Or to open an icon, first select it, then execute the File->Open command. Later, it was obvious that opening something was a very common operation (not only for icons!), so double click was invented as a *shortcut* of File->Open.

    Why is single click used to select and double click used to open? Because opening is an extension of selecting, and not the other way: in order to open something, you have to first select it.

    How to avoid the user mistaking single and double clicks? The few times I teach somebody that have never used a computer, I teach them to open icons by selecting them and using the File->Open command. Then, after a few weeks of practice, I tell them "look! There is a shortcut to this File->Open thing you do daily: just click twice quickly". It works. Double click was never intended as a primary interface, but as a shortcut for power users (much like Alt+F4), and should be treated as such.

    BTW: I recommend any user interface programmer to teach how to use the computer to end users from time to time. It's humbling, and it teachs you a lot about how real users think and operate. You may end learning more than your pupils!

  18. Evan says:

    The discussion on single vs double click is interesting. I'd be interested to know what portion of the time I do each. I *have* played around with single-click-to-launch in KDE and stuff, and I think I didn't like it. But I'm not sure I gave it a fair shake either.

    The reason I don't like it is because opening in some sense is more "destructive" than selecting, so it should be harder even if it's done more often. Sure, it's not destructive in the "you'll lose your data" sense, but it is of the user's time: now they have to at least close whatever program opened, and practically speaking deal with a new window stealing focus and waiting a tic for it to become responsive enough to close. I found that single-click-to-open led to too many "opening things accidentally" and got annoying.

  19. Joshua says:

    @Douglas: That's why I write my own custom tooltips.

  20. Ian Boyd says:

    "Hey, that blog title sounds like an interesting topic.

    "Wait. What?"

  21. dbacher says:

    In the old days (talking really old days), you had to use a modifier with click to activate rename.  Microsoft removed the modifier key with Windows 95 (believe it was alt in fileman, it's been forever).  Interestingly enough, IBM retained the modifier key in Warp on their equivalent of folder views, because people were "entering edit mode unintentionally."

    There are two interesting things.

    Double-clicking tends to happen because there's not immediate feedback from the single click.  The user clicks the button, they expect something to happen, it doesn't instantly happen and so you see the second click –inside the time window and movement window.  Frantic repeat clicking isn't uncommon, and so providing some early effect to indicate "yep, I saw that you clicked that button, yes-sir-ree, now I'm working on it" within 200ms (at absolute most) is important.

    The other interesting thing is — if you're using Mastercard and Visa's guidance, that predates the first web apps, in processing mail orders, it isn't possible to submit a dupe to them in the first place barring a disk failure.  If you're following their guidance and populating the optional fields, and you do manage to submit a duplicate — you'll get back the same AUTH code as on the initial transaction, or you'll get a DECLINED-DUP back.

    Just saying, if you use MVVM, MVC or similar patterns — say Windows Workflow — for the ordering process, then the second "pay for this" should be received when the object isn't in a state where it can process it, anyway, and should be rejected as a result.  Typically, you'd redirect back to the status page without any explicit message. :P

    The root issue isn't the double click itself, but the number of apps that do ridiculous things on it.

    On a side note, enter is the same as double clicking (executes the verb).  I can count on one hand how many users I've seen click an item with the mouse and then press enter, versus double clicking.  Also, if you go to the newsgroup archives, you can see what happened when Microsoft tried to change the default in Windows Explorer to single-click launch.  It… wasn't pretty.

  22. meh says:

    Pedestrian crossing buttons… elevator door buttons… website form buttons… operating systems. Same same: bang on them like a primate until they reward you :)

  23. Medinoc says:

    Single-click mode has become "not worth it" since Vista switched to full row selection (even though it can be disabled in the registry).

  24. David Walker says:

    @Joshua and James:  Get your mom a wheel mouse.  On most of those, you can set them up so that pressing the wheel sends a double-click with no mouse movement.  (Even if they are moving the mouse a little bit when they press the wheel, the mouse software will send a double-click with no movement to Windows.)  I love it.

    Some mice also have a center button that does the same thing.

    Yes, double-clicking as an event was probably not the best idea.  Oh well.

  25. Gabe says:

    James: A touchscreen is not very easy to use for those with limited manual dexterity. It's difficult to exactly touch small targets, touches often turn into short drags, and it's hard to keep only the pointer finger touching the screen. When dragging, a curled-up non-pointer finger or palm may touch the screen, confusing the system. It's likely that pressure while dragging will be uneven, sometimes causing the finger to leave the screen and abruptly stop the dragging action. Also, users may be inclined to use their non-pointing hand to hold the device such that their thumb may touch the screen, again confusing things.

    I don't know whether touchscreens are better or worse than mice for those with limited dexterity, they certainly aren't a panacea.

    BTW, I know an elderly woman who can only use a mouse when it's rotated 180 degrees (the tail facing her rather than away from her).

  26. Skyborne says:

    I've tried KDE 4's single-to-open setting and it doesn't work out any better with a tablet than double-clicking.  If I use the tablet to click a folder and I wasn't careful about it, Dolphin promptly whines "You can't drop a folder into itself."  Well, I guess I should be happy that it doesn't try to make a copy when it thinks I'm holding the folder and it's (apparently) also still underneath.

    With a mouse I tend to accidentally hit (+) because it's there, and then think, "I actually need to open that."  So two clicks anyway.

  27. James Schend says:

    @David Warner: Someone having trouble with the dexterity required to double-click quickly is going to have trouble clicking the mousewheel without moving the mouse also.

  28. voo says:

    @James Then why learn them to double click in the first place? Everything a double click does can also be done by right-click -> open. That's even exactly the same number of clicks, just slower (which seems to be the wanted behavior in the first place?).

  29. James says:

    <quote>

    I am opposed to double-click as an event. It is non-intuitive and a difficult action to perform. For example, my own mother is often found pulling icons around instead of launching applications due to the difficulty in double-clicking while keeping the mouse reasonably still. I know that there are settings to control the double-click time and motion and I have adjusted them on her computer. This is of no use when she is using an unfamiliar system. I would prefer that the defaults were more friendly to those without precise motor skills.

    At this time, I know how strongly these concepts are baked in to Windows users. Updating this would require dragging users kicking and screaming into single-click land. This is not something most paying customers would want (unless they're into that sort of thing).

    </quote>

    Wow, I was just about to type something to this effect after reading your first comment Joshua, but this second one hit the nail right on the head! I spend a few hours every now and then (re-)teaching my mother that Windows Explorer requires double-clicking, but Internet Explorer requires single-clicking. You can well imagine how that conversation goes. ::) Also, someone mentioned the Explorer setting to turn everything into a single-click. Ugh, I hate that and have never turned it on ever, and I can't really keep switching to it every time my mother decides to sit at the PC or laptop. There was also an interesting video in a recent Building Windows 8 blog post, where they talked about touch and how even the mouse was deemed to be irritating/useless back when it was introduced. They included an old video of some MS guy doing usability testing, and the poor user not being able to double-click because his mouse kept shifting a minuscule amount between clicks. Guess what, 30 years on and my mother's facing the exact same thing! What does that tell us? Not only her, many senior citizens at this evening class I take have real trouble learning to double-click properly. As for drag-and-drop, forget it. More often than not they'll complain that things have mysteriously disappeared. Of course, they could not manage to hold on to the button while dragging, and the file/folder/whatever disappeared into some unintended location.

    Maybe a touchscreen tablet is the answer to all these woes? I don't know, but I'm willing to try it for sure. There's a huge market for devices that can make input easier for people with poor motor skills such as aged relatives and so on. Many of them would love to do more with this fascinating technology, but are turned off by things such as the mouse, clicking/dragging icons etc. A simplified touch-based interface may possibly be able to bring them into the fold, without all the aggravations they face nowadays. Let's face it, Windows (and other GUI-based OSes) haves been around 2 decades or so and have *still* not made input all that much easier for the average user, but technology may have finally caught up and enabled an entirely new paradigm which will revolutionize UIs. (I know touch technology itself is not new, but it has only become mainstream recently, and still has a long way to go.)

    Anyway, sorry for the rambling post, but hopefully things are looking up and in future we can all forget about teaching people where to single-click, double-click, right-click, shift-click and so on. :)

  30. I vaguely remember the IE4 Platform Preview enabling single-click launching by default (or possibly I just tried it out for a bit, it was a long time back!) – the results were not pretty. Although the argument in it's favour was solid, trying to actually use it was an endless barrage of frustration.

    @BradWestNess: Indeed, Metro apps do away with double clicks altogether. Which is nice because not only will it mean not having to try to teach people how to do it, but double clicks are also rather touch/stylus unfriendly actions.

    @Antonio Rodríguez: I'd echo the sentiment about sitting down and teaching novice users – it's amazing just to watch their thought processes and can give you a whole new perspective on just how "intuitive" a piece of UI is.

  31. ender says:

    @AndyCadley: it wasn't just the preview – the final did it, too if you installed the Desktop update.

  32. James says:

    David Walker: "Get your mom a wheel mouse.  On most of those, you can set them up so that pressing the wheel sends a double-click with no mouse movement."

    Umm, actually, I do have wheel mice (are the old-style no-wheel ones even available nowadays?) Thing is, to enable that feature (middle-click = double-click), I have to install and keep the mouse's software running. Also, the default behavior of middle-click = auto-scroll in apps such as MS Word, IE (and most any browser) and so on is really nice to have, and something even my mom does use when navigating through lengthy documents/pages. Thus I'm not inclined to install and keep an app running only to replace a perfectly good existing function.

    voo: "Then why learn them to double click in the first place? Everything a double click does can also be done by right-click -> open."

    Actually, I gave up pretty quickly on explaining left vs. right-clicks, where the latter work, what they do… *and* have the info stick across sessions. Left single/double (latter of course being the difficult one) and middle clicks are just enough so as not to cause information overload. Although you're absolutely right in that right-clicks would really come in handy to prevent double-clicks turning into spurious file/folder rename attempts (as Raymond mentioned above), the few times it was attempted led to confusion on their part regarding *even more* options turning up (depending on extensions installed, sometimes a lot in Explorer). Since eyesight is also an issue with some or more, having to read through the entire menu every time just seems to cause more chaos, with incorrect items being clicked almost as often as the correct/required one. Sigh…

    Gabe: "BTW, I know an elderly woman who can only use a mouse when it's rotated 180 degrees (the tail facing her rather than away from her)."

    Yes, some of the seniors in my evening class tend to do the same, no idea why. Can't believe it's any more comfortable compared to the 'normal' grip. Also, lots of them seem to somehow run out of mouse pad area while moving the mouse. I've tried speeding up the pointer, but that only makes things exponentially more difficult, and even though I can keep my wrist static and just move the hand to get the pointer to reach all the 4 screen corners, they can't. That's why I see them often picking up the mouse from outside the pad and placing it back in the center.

  33. Joshua says:

    @Gabe: I often have to pick up the mouse. However I use certain programs that jump the mouse cursor so go figure.

  34. Horst Kiehl says:

    In addition to what Antonio Rodríguez wrote, since Windows Vista there is another possibility to avoid the double-click: Single-click the document to mark it, and the toolbar contains an item to open it, and this item might be large enough as a target for mouse movements.

    If Explorer knows about more than one way to open the document, it offers them in a menu after the little down-pointing triangle on the side of that item has been clicked. While this is a small target, if it has been clicked accidentally, the default open target on the toolbar is still there.

Comments are closed.