Why isn’t QuickEdit on by default in console windows?

Date:September 13, 2007 / year-entry #342
Tags:history
Orig Link:https://blogs.msdn.microsoft.com/oldnewthing/20070913-00/?p=25143
Comments:    46
Summary:In the properties of console windows, you can turn on QuickEdit mode, which allows the mouse to be used to select text without having to go explicitly into Mark mode. (In a sense, the console window is permanently in Mark mode.) Why isn't this on by default? It's so useful! Somebody thought the same thing...

In the properties of console windows, you can turn on QuickEdit mode, which allows the mouse to be used to select text without having to go explicitly into Mark mode. (In a sense, the console window is permanently in Mark mode.) Why isn't this on by default? It's so useful!

Somebody thought the same thing and changed the default in one of the earlier versions of Windows (my dim recollection was that it was Windows 2000) without telling anyone, especially not the manager responsible for the feature itself.

The change was slipped in late in the game and made it into the released product.

And then all the complaints came streaming in.

Since the change wasn't part of any of the betas or release candidates, customers never got a chance to register their objections before the product hit the streets.

Why did customers object anyway? Because it breaks console programs that want to use the mouse. A console program that calls ReadConsoleInput can receive input records related to mouse activity. A full-screen character mode editor like, say, emacs or vi or something more Windows-centric like the M editor that came with the Programmer's Workbench will use the mouse to select text within the editor itself. Or they might hook up a context menu to right-clicks. At any rate, turning QuickEdit on by default means that the mouse stops working in all of these programs.

A hotfix had to be issued to change the QuickEdit default back to "off". If it means that much to you, you can turn it on yourself.


Comments (46)
  1. charless says:

    So, is there a way to make QuickEdit the system default? All the stuff I see, says goto properties and select QickEdit and select apply. This will only affect the current instance, or the shortcut that started the current instance, or the program if it was not started from a shortcut. As a developer I have serveral shortcuts to various command prompts. (Win DDK (6+), SDK, .Net SDK, visual studio tools (2+), command prompt, etc.

    The story “hints” that maybe there is an “easy” way to make QuickEdit the default and I could just turn it off for “once in a blue moon” that I run a program that wants a console mouse.

    Registry entry? Group policy? Anyway great story! Thanks for the insight, and the reminder that things are not always as simple as they seem.

    [There’s a menu option called “Defaults”. Gosh, I wonder what it does… -Raymond]
  2. Kip says:

    I do turn it on myself, because I love it.  However when I read the title of the post I was expecting the answer to be "because it confuses users who are not experts."  If the window has focus, and you click on it, you get a white selection box.  If you click somewhere else, that doesn’t get rid of the box but just move it.  A novice user might not know to hit escape to cancel the selection, or right mouse button to copy the selected text to clipboard.

    Also, if it is a window that just prints traces behind some GUI app, clicking in it when it has the focus already (thus creating a selection box) will cause your app to freeze for no apparent reason.  (I know this may not be true of all apps; when I’m running telnet, for example, selecting in the window doesn’t prevent text from scrolling by.)

    Not that I’m bashing Quick Edit–like I said, I love it, and if you are familiar with it there is nothing unexpected.  But I guess your answer is better because novice users don’t encounter console windows all that often anyway (I imagine they are very scary to some people).

  3. Maxim says:

    I thought the "Defaults" item next to "Properties" was reasonably obvious to play with. "Properties" is for this window/program/shortcut (says so in the title bar) and "Defaults" is for all console windows (ditto). Anyone sufficiently techy to be going in there will be able to check the effect of each anyway.

  4. Ulric says:

    I’ve never noticed there was a ‘default’ menu entry.  Doesn’t matter since I start the command prompt with a shortcut, and changed the shortcut’s property

  5. hehe, just to show that obviousness is a relative thing (both for the article and the first comment, J)

  6. John Topley says:

    Out of interest, shouldn’t the Properties and Defaults menu items have an ellipsis at the end of them because they bring up a dialogue?

  7. Gee says:

    On a similar topic, I really miss the console window toolbar that was present in W95/98/Me.

    The edit mode was just one click away (as well the paste operation), now we have to delve into nested menus.

    (Not that I complain, I am quite OK with the tollbarless console. Just a hit of nostalgia I guess)

  8. Slightly off-topic, but I remain dumbfounded by how the UX for the console remains stuck in prehistoric times. I mean, the Amiga’s command line shell was better in the 1980’s, as was xterm on Unix several decades ago. (Plus, the consoles on other platforms have seen continual improvement, not to mention 3rd party variations that actually work!)

    For example, most related to this topic, why are we still stuck with the painful rectangular selection model? Why can’t I arbitrarily resize the window?

    Unfortunately, due to the nature of cmd.exe it’s difficult to impossible to build a wrapper Win32 app that redirects I/O and behaves correctly, even ignoring compatibility with console apps like text editors that depend on the funky console implementation. It’s not hard to make it work on a very basic level, and I’ve done so several times, but I gave up after finding too many fatal quirks that would be a full-time job to work around.

    Ah well, I should probably rant about this on my own blog. :)

  9. Consolas says:

    Quickedit mode also enables mousewheel scrolling for console apps that don’t handle it natively. Very useful if you have a text-based logging program.

  10. Dewi Morgan says:

    Select and enter to copy, rightclick to paste.

    On by default works for me, and has gone on my list of things that remain cool about my win2k install.

  11. MikeStew says:

    I never wondered what the Defaults menu option does.  Since there’s no ellipsis, I assumed (obviously incorrectly) that it resets all of my colors, font selection, and Quick Edit back to the default(s).

  12. Brother Laz says:

    From about ’96 to the turn of the century, Microsoft was obsessed with A. making Windows look like a webpage; B. hiding any trace of MS-DOS.

    The company tried very hard to downplay the Win9x-DOS connection, to the point of removing the boot-to-DOS option from the WinME boot menu. Perhaps DOS was perceived as a renmant of the past.

    Nowadays Windows has matured beyond this point, but this approach may have prevented the development of a better console until after the death of Win9x, at which point it was no longer worth the effort because nobody used DOS apps anymore.

  13. Brother Laz says:

    (My previous post was a reply to tonyschr)

  14. asdf says:

    tonyschr:

    http://sourceforge.net/projects/console/

    It’s kind of quirky though because you have to jump through many hoops to do this sort of thing on Windows.

  15. Jess Sightler says:

    Windows Powershell (formerly known as Monad) is supposedly going to have a nice new console in the next major release.

    As far as I am concerned, that is the right way to do it.  Leave the old command console for legacy apps and start building new things on top of Monad.

  16. Tom says:

    Speaking of PowerShell, I have a friend who actually started working at MS last year and they put him on the PowerShell team.  My understanding is that the development team is pretty small and that they’ve had some trouble getting "respect" from some of the other teams.    Hopefully, PowerShell doesn’t end up on the cutting room floor.

    Anyway, I asked my friend if Raymond has an "atomic personality" as Raymond claims in his blog.  The reply was that the MS campus was so big that my friend has never met Raymond.  I don’t know is he’s being truthful or if he’s just too nice to say anything bad about people. :)

  17. Scott Wagner says:

    Something else that happens when the console session is "marked" is that it pauses the execution of the console application!

    We used to run into a problem a lot where we’d have console services running on a server that was managed via Terminal Services.  If someone wasn’t careful and accidentally clicked on a console window to bring it forward, they would also inadvertently enter Select Mode and halt that process until it was cleared.

  18. Consolas says:

    Keep in mind that cmd.exe and the windows console subsystem are two separate concepts. It’s the console subsystem that’s responsible for things like buffering command history and handling copying & pasting.

    So unless Server 2008 comes with a totally new console subsystem, powershell won’t be able to work around its limitations.

    I find it somewhat ironic that the Mac, a platform that didn’t even have a console until a few years ago, now has a better one than WinXP/Vista.

    [I don’t find it ironic at all. The latecomer can learn from the lessons of the past. -Raymond]
  19. Neil says:

    "Why can’t I use the mouse to move the cursor?"

    What would that mean? (Apart from apps such as EDIT, which already does something sensible.)

  20. Brother Laz, MS-DOS is a different issue than having a good command line interface. Developers and system administrators tend to heavily use the command line interface on any OS. cmd.exe may have a bunch of compat hacks for old DOS applications, but it’s not about that in modern scenarios.

    asdf, seen it and tried ’em all, and contributed to several dead-end variations. I haven’t seen one that’s viable yet.

    Consolas, my impression was that PowerShell is indeed rehostable in a way that enables Microsoft or 3rd parties to build a wrapper UX that has tons of great features and isn’t limited by the idiosyncrasies of the Windows console subsystem. I haven’t looked into this because my main use of cmd.exe these is for our build system, where I don’t think I can substitute PowerShell. I’ve already settled on the workaround of using eshell (an emacs-based command line interface written in elisp — quite nice actually) to avoid the pathetic cmd.exe UX, so I have low motivation for creating my own UI for PowerShell since I still have to use cmd.exe anyway.

    I look forward to a day when I can ditch both cmd.exe and eshell for PowerShell with a decent UX on top!

  21. orcmid says:

    Since the desirability of quick edit, or not, has been remarked upon quite enough, I’ll respond to something else.

    The M Editor was my favorite for a very long time.  

    I edited a lot of Internet text posts in it.  I also used the multi-file grep facility very heavily.  I became fairly comfortable with all of the settings that could be controlled.  It did indentation exactly the way that suited me, especially the easy way of over-riding an indent by backing out one level at a time.

    Every so often I miss it, especially when fussing with the current crop of IDE editors that make me work too hard to get the layout I want.

    PS: I need to get Unicode console [apps] working later this year.  I’ll report how well that goes at that time.

  22. Jonathan says:

    Judging by its prominence in Exchange 2007, PowerShell gets an all-round endorsement from the Exchange team, which I’d expect is quite influential in Microsoft. I expect it to ship with the next version of Windows Server (currently codenamed Longhorn).

    I use cmd a lot, and always turn on quickedit on the defaults option, together with setting the buffer to 120X9999. On existing machines, you may want to go to HKCUConsole and delete all the by-command-line and by-window-title settings in there (unless you actually want them).

    Annoyances with the Vista cmd shell:

    * You can drag files from Explorer into the shell, and have their path appear on the commandline. You could do that with Windows XP/2003. Ctrl-right-click -> "Copy path as text" is a poor substitute.

    * If you change anything in a cmd window property, the quickedit and insert mode will clear themselves. Try it:

      – Have a normal cmd window with quickedit and insert on,

      – Then open the properties, change the buffer size, OK

      – Result: The window is no longer in quickedit or insert mode!

      This bug didn’t exist in XP/2003.

    Annoyances with all cmd shells:

    * Why do we stick with the idiotic rectangular selection? It would be much better to select full lines.

    * Why can’t I use the mouse to move the cursor?

    * And how do you get a cmd window that displays non-English characters? For the life of me, I haven’t been able to do that.

  23. Jonathan says:

    By "use the mouse to move the cursor", I meant along the commandline I’m currently typing. I don’t expect to move the cursor arbitrarily across the screen.

  24. Boris says:

    As someone who uses the console selection feature only on the rare occassion I need to run a command-line program, I would prefer just to use it rather than search for options. On the other hand, I would expect day-to-day console users to know how to turn off QuickEdit. It’s possible that most console users are power-users, though.

  25. Nick Mason says:

    Thank you Raymond, I had absolutely no idea about this! I’d consider myself a command-prompt die-hard, considering that cmd.exe is the single-most used Windows program on my machine. I use the command prompt for most things, from esoteric batch files, to running Win32 ports of my favourite Unix tools, and I regularly copy and paste things from the command prompt into notepad and elsewhere. For as long as I can remember, I’ve always gone the long route (Menu->Edit->Mark) and never knew this had changed since early versions of windows, and like MikeStew, I’d assumed that Defaults reset things to their default rather than displaying a defaults window.

    Thanks, you’ve saved me a fair bit of time here!

    BTW: MikeStew, I seem to recall that an ellipsis means "this command needs input from you to complete its task" rather than "this command leads to another window", as many people (myself included in earlier years) seem to have become accustomed to. My knowledge didn’t help me though :-)

  26. Bahbar says:

    @Tom

    The reply was that the MS campus was so big that my friend has never met Raymond.  I don’t know is he’s being truthful or if he’s just too nice to say anything bad about people. :)

    Wow, way to bash both your friend and Raymond… Any reason to share that "fact" here ? Do you really not believe the Microsoft campus is big ? really big ?

    http://www.microsoft.com/presspass/features/2006/feb06/02-09CampusExpand.mspx

  27. John says:

    Tony:

    Microsoft must ensure the Windows 2045 console is backward compatible with Lotus 1-2-3.

  28. 640k says:

    I think Defaults and Properties should have ellipsis… because they need additional input before any settings can be applied…

  29. oldie says:

    Console apps which uses mouse input sux. They should be punished instead of supported.

    64-bit windows cannot run old dos apps anyway, so it’s a diminishing problem.

  30. James Schend says:

    Anyway, I asked my friend if Raymond has an

    "atomic personality" as Raymond claims in his

    blog.  The reply was that the MS campus was so

    big that my friend has never met Raymond.  I

    don’t know is he’s being truthful or if he’s

    just too nice to say anything bad about people.

    Microsoft employs approx. 70,000 people in the Redmond, WA area. You could spend your entire life at Microsoft and not meet some specific person (also spending their entire life at MS) quite easily. Even moreso if you’re in different product groups– most of Microsoft Games, for instance, was in the Millennium campus which is pretty far from the Main Campus.

  31. Jimmy S says:

    Is there any reason why the console does not support the CTRL-V, CTRL-C.

    I havn’t used any DOS prompt is o long, I don’t remember if DOS shell supported that.

  32. KenW says:

    Jonathan: "By "use the mouse to move the cursor", I meant along the commandline I’m currently typing."

    If you’re typing already, why would you want to move your hand over to the mouse to change the cursor position on the same command line? Wouldn’t it be quicker (and easier) to use Home, End, <-, and ->?

  33. ulric says:

    I think you could always use ‘Take Command’ from jpsoft to have a GUI command line which probably has non-rectangular selection http://www.jpsoft.com/

    I could never get use to it ten years ago, and I haven’t tried it again since.

    I use ‘4nt’, have been using it for that long. I love its command-completion and CTRL+TAB window for completion

  34. alex.r. says:

    Is there any reason why the console does not support the CTRL-V, CTRL-C.

    They are supported, just not for paste and copy.

  35. Feroze says:

    Why is cmd.exe joined at the hip with CSRSS? It would be nice to get a blog post on this that delves into that part of history.

    [Why is xterm joined at the hip with /bin/csh? It would be nice to get a blog post on this that delves into that part of history. -Raymond]
  36. Tomer Chachamu says:

    I don’t think xterm is “joined” with csh – anybody can run sh, ash or bash.

    [Exactly. I was making an analogy. -Raymond]
  37. zzz says:

    I would argue you are wrong. The complaints that came in were from a vocal minority (eg. emacs/vi etc users).

    If you take a second and did a poll on this you’d find that a majority of users prefer the QuickEdit to be enabled because most of the time in console when the sample of all console users in the world is considered is actually spent largely somewhere else than the few programs which get broken by this feature.

    Those programs are the EXCEPTION, if MS is so worried about compat then they should flag these programs and automatically temporarily disable quickedit when they’re ran.

    So I am recommending a hotfix to turn it back on.

  38. Feroze says:

    My understanding was that cmd.exe was a special process that was owned by CSRSS. That is why it is difficult to replace it easily on Windows. Has that changed since Vista?

    [There is nothing “special” about cmd.exe. It’s just a console program. A very popular one that lots of people hard-code (similar to how people hard-code notepad.exe), but still just another console program. People have already written replacements (e.g. 4NT). -Raymond]
  39. Igor says:

    Q: What would Solomon do with QuickEdit?

    A: He would enable QuickEdit in windowed mode and disable it upon switch to full screen mode.

    Regards,

    Solomon

  40. gibwar says:

    @Feroze: I’ve never seen anything mentioning that cmd.exe is linked to csrss.exe. If you think about it though, *every* program is "linked" to csrss.exe…

  41. Jonathan says:

    cmd.exe is not linked to csrss.exe. I think the question was “Why are _Console_windows_ different from regular windows (for example, they theme differently), and why do they seem to be implemented in csrss.exe?”

    [You have to implement them somewhere. -Raymond]
  42. Yuhong Bao says:

    Yep, it was Win2000 that had QuickEdit as the default.

  43. Richard says:

    csrss.exe is the Win-32 subsystem, and therefore is linked to CMD.EXE because it’s a Windows Console application.  The other two subsystems include POSIX and OS/2, although the OS/2 subsystem was withdrawn starting with Windows XP.

Comments are closed.


*DISCLAIMER: I DO NOT OWN THIS CONTENT. If you are the owner and would like it removed, please contact me. The content herein is an archived reproduction of entries from Raymond Chen's "Old New Thing" Blog (most recent link is here). It may have slight formatting modifications for consistency and to improve readability.

WHY DID I DUPLICATE THIS CONTENT HERE? Let me first say this site has never had anything to sell and has never shown ads of any kind. I have nothing monetarily to gain by duplicating content here. Because I had made my own local copy of this content throughout the years, for ease of using tools like grep, I decided to put it online after I discovered some of the original content previously and publicly available, had disappeared approximately early to mid 2019. At the same time, I present the content in an easily accessible theme-agnostic way.

The information provided by Raymond's blog is, for all practical purposes, more authoritative on Windows Development than Microsoft's own MSDN documentation and should be considered supplemental reading to that documentation. The wealth of missing details provided by this blog that Microsoft could not or did not document about Windows over the years is vital enough, many would agree an online "backup" of these details is a necessary endeavor. Specifics include:

<-- Back to Old New Thing Archive Index