Whose idea was it to make Ctrl+Backspace delete the previous word?

Date:October 11, 2007 / year-entry #374
Tags:history
Orig Link:https://blogs.msdn.microsoft.com/oldnewthing/20071011-00/?p=24823
Comments:    32
Summary:James Manning mentioned in a footnote to a blog entry on PowerShell and WMI that he considers the Ctrl+Backspace shortcut key a Windows-ism. Where did this shortcut key come from? From a fan of the Brief editor. A few people in the early days of the Internet Explorer group used the Brief editor, which uses...

James Manning mentioned in a footnote to a blog entry on PowerShell and WMI that he considers the Ctrl+Backspace shortcut key a Windows-ism. Where did this shortcut key come from?

From a fan of the Brief editor.

A few people in the early days of the Internet Explorer group used the Brief editor, which uses Ctrl+Backspace as the shortcut key to delete the previous word, and they liked it so much that one of them added it to the autocomplete handler. Therefore, any edit control that uses SHAutoComplete will gain this secret Ctrl+Backspace hotkey.

This is one of those scary "rogue features". There's no spec, there's no testing, it's just a developer who spent some time whacking a feature into the product because he liked it. Sure, rogue features can often become useful, but they also create a lot of liability. Imagine if a rogue feature was the cause of a program crash, an application compatibility problem, or worse, a security vulnerability.


Comments (32)
  1. John says:

    Rogue features?  We have enough problems with fully specified, tested, and documented features as it is.

  2. Skip says:

    I used brief for years, and then CodeWright in brief emulation mode.   It wasn’t until about VS2000 that the built-in editor got good enough to not make me switch away from it.  And even then I probably wouldn’t have except for the integrated debugger.

    My favorite brief-isms?   The way the home and end key worked.  

    Home – go to beginning of line

    Home Home – go to beginning of logical unit (para, page, etc.)

    Home Home Home – go to BOF

    End worked the same way, except towards the end of the file.   The OS2 version of brief even worked under the OS2 subsystem in NT.

  3. Alistair says:

    Hmm. I’ve never used Ctrl-Backspace (until right now!), but it sounds incredibly logical. Just as Ctrl-Left moves the cursor left one word and Ctrl-Right moves it right one word, you would expect Ctrl-Backspace to delete one word to the left of the cursor and Ctrl-Delete to delete one word to the right of the cursor. (And, in this edit box in Firefox on Windows, both do in fact do that.)

    It may not have been formally specified, but it’s entirely intuitive. (Oddly enough, I just tried it in Emacs, and it’s the reverse! That may be something to do with my keybindings, though…)

  4. Ivo says:

    Vaguely on topic: Why does Ctrl+Backspace produce a character code 127? Try pressing it in Notepad. Depending on the font it is either blank or looks like a square.

  5. Joel Eidsath says:

    Editing in Notepad, Word, or anything on Windows would be absolute hell without ctrl-left, ctrl-right, and ctrl-backspace. Your unnamed Brief fan deserves a prize.

    Nearly everything has cloned ctrl-backspace. The Firefox textbox that I’m editing this in has it, of course. The Internet Explorer address bar has it, intelligently deleting to the last slash. (Of course IE 7 screwed up with their search box, and it just makes pretty squares instead of deleting anything…I won’t cast dispersions, but like I said, I’m editing this in Firefox.)

    Want to hear about a real rogue feature? Open Office cloned the ctrl-backspace shortcut key of course, given that it was so useful. But several years ago, an OO developer decided that a useful complement to ctrl-Left and ctrl-Right would be ctrl-Up and ctrl-Down keys. What did he decide they should do? Move the entire paragraph you are editing up or down.

    The behavior was only in the Windows version of Open Office, so it may have been a toolkit issue. (It was fixed before long.)

    Ah well, back to vim (which does not in fact have those useful ctrl- keys, much to its shame).

  6. dbt says:

    Joel, use ctrl-w to erase word in vim.

  7. dave says:

    "back to vim (which does not in fact have those useful ctrl-keys, much to its shame)"

    Unless vim has been "iMproved" enough to lose most of the usefulness of classic vi, it already has those operations, and there’s no shame in not adding redundant commands for operations that are already supported.

  8. Joel Eidsath says:

    I should have brought up something harmless like religion instead of vim. My girlfriend wouldn’t talk to me for a few days the last time the subject came up. (She didn’t like how I did my regular expressions. Yes, really.)

    That said.

    Vim’s keyboard shortcuts in input mode are nowhere near as nice to use as ctrl-arrow and ctrl-backspace. For one thing, ctrl-w requires use of the right ctrl key, something that all keyboard shortcuts should avoid. And how do you move by word while in input mode?

    And to correct a previous point. I said earlier that Notepad supports ctrl-backspace — it doesn’t. It’s Wordpad that supports it.

  9. AJ says:

    I have always used Ctrl+Shift+Left Arrow to highlight what I want to delete and then delete, but this is much faster.  Sounds like a completely reasonable rogue feature to me.

  10. Gabe says:

    It’s pretty standard that L/R arrow keys move one character and CTRL+L/R arrow keys move one word. So it makes sense that if backspace/delete erase one character, CTRL+backspace/delete erase one word. I know I’ve been using that shortcut for decades, so I doubt Brief was the first program to have it.

    A quick check of my XP system shows that the RTF control supports it (as does Word), and the edit/combo box supports it when autocomplete is on. FireFox uses an autocomplete edit box for its search field and IE 7 just uses a standard edit control, which is why FF gets Ctrl+Backspace for search and IE doesn’t.

    What about Word and the RTF control? Is it a rogue feature for those too, or was it spec’ed out?

  11. Tyler says:

    Ctrl-Backspace and Ctrl-Delete work in TextPad as well as VS. I’m going to have to start using them.

    Thanks for the tip.

  12. mikeb says:

    Way back when, Brief was my editor of choice.  I’m not sure that I could go back today, but I do still like to use NumPad-5 to center the current line in the edit window.  Too bad it’s a bit of a pain to configure that key in some editors.

    I wonder if the Brief editor linked to has any actual rights to the name (I supposed it would have had to been purchased from Borland or whatever the name of the company that used to be Borland is today).  Also, it’s nice to know that I can buy the source code for only $60,000 on my Diner’s Club card.

  13. Dave Nanian says:

    As one of the original creators/designers/authors of BRIEF (along with Michael Strickman), it’s always been kind of amusing to see this kind of thing pop-up over the years. I’ve always wanted to see other editors use the Home/Home/Home End/End/End logic I came up with — it’s one of the things I’m proudest of (and it’s easy to get wrong, since it is NOT dependent on current location, which wouldn’t be predictable/consistent).

    That site, though, has nothing to do with the original BRIEF editor. In fact, looking at the screen shots, it doesn’t even look like BRIEF did, except in the vaguest way… it’s certainly not BRIEF!

  14. Steve Nuchia says:

    "Vaguely on topic: Why does Ctrl+Backspace produce a character code 127?"

    ASCII terminals and the multiuser operating systems serial port drivers that talked to them fell into two camps regarding the "delete most recently entered undeleted character" operation.

    One camp used BS (control-H, code 8 decimal) and the other used DEL (code 127).  I don’t know where notepad inherits that functionality from but there is probably a terminal emulation program "ask" in the woodpile.  Terminal emulators had to provide the ability to generate both codes anyway and I suppose that hooking the "other" backspace code to a modifier+Backspace-key combination makes sense in that context.

    I wasn’t involved in Microsoft systems back then but I wouldn’t be surprised if this goes all the way back to the MS-DOS and CPM console drivers.

  15. Jan Kučera says:

    I actually use this shortcut and find it intuitive, as with the Ctrl+Delete.

    However, what is less consistent is what do these keys delete. In Word for example, it seems that Ctrl+Backspace and Ctrl+Delete behaves the same and does treat the whitespace as part of the word. In Visual Studio however, the Ctrl+Backspace deletes word including whitespace while Ctrl+Delete excludes it (http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=91162).

    Now I now whose idea was the Ctrl+Backspace thing, but don’t know why it got so many implementations. :-)

    Personally, I think the same key should not do different things, so I feel the Home/Home/Home End/End/End logic is not better than the more intuitive Home/Ctrl+Up/Ctrl+Home.

    PS. Ctrl+Delete does not work in Notepad either, it deletes the whole line… I wish Ctrl+ editing stuff to be included in Notepad too…

  16. Mark Sowul says:

    I love this shortcut, and it bugs me when it makes ASCII 127 instead of deleting the word (although, it’d make for a good addition to one’s password…)

    By the way, it works fine for my IE7 search box (on Vista); don’t know why the others are having trouble with it.

  17. Dave Nanian says:

    Actually, Jan, the "same key" didn’t do different things. Home+Home is like a double-click. It’s like modifying a key with itself, rather than with Ctrl.

    It’s easy to use than describe — really, it was a pretty great keystroke, and "felt" much better than Ctrl+Home (or Ctrl+PgUp, and all the other multiple keys that could be used)…

  18. steveg says:

    Joel Eidsath said: "My girlfriend wouldn’t talk to me for a few days the last time the subject came up. (She didn’t like how I did my regular expressions. Yes, really.)"

    Did you try backtracking? :-)

    (boom-tish!)

  19. Dileepa says:

    Any idea why this ‘feature’ doesn’t work consistently in the Run dialog? Sometimes, Ctrl+Backspace deletes the previous word, and sometimes all it does is display a rectangle.

  20. Igor says:

    Brief is inferior to TSEPro.

  21. gerleim says:

    I have a more troubling shortcut… It’s shift + delete. (To cut, I prefer ctrl + X.) I use shift + down arrow to mark (code) lines to delete… then I press delete, and often I still press shift… And I loose something else I just cut/copied onto the clipboard. I don’t know if this troubles me only… but I cannot find a (free and working) solution to turn of shift + delete.

    Any tips, besides I’d learn to release shift in time?

  22. Mark Steward says:

    gerleim: use backspace or a clipboard manager ;-)

    This reminds me (not a suggestion, I know the box is closed) – anyone here know why double-clicking on a blank line at the end of a document in notepad jumps to the start of the document?  Is it some weird double-click drag feature?

  23. [ICR] says:

    I too love Ctrl+Backspace, though I do get a bit irritated at the inconsistencies involving whitespace. usually it’s the complete opposite of what I expect it to be.

    I sometimes use the character in passwords.

    "Editing in Notepad … would be absolute hell without … ctrl-backspace."

    Except Notepad doesn’t support Ctrl+Backspace, though I do suspect you were just saving on excess specificity.

  24. JS says:

    It seems like this should be an official feature by now because it’s so useful. Perhaps the fact that it’s a rogue feature is why I get an ugly box in the text field when I try to Ctrl+Backspace in some places. And as a feature, it makes sense to me, because Ctrl plus left or right arrow moves in between words.

    It would be nice for it to be supported everywhere like Option+Backspace is on Mac.

  25. Dan McCarty says:

    Mark: double clicking in Notepad selects the double-clicked word.  When you click on a blank line in notepad it looks like it jumps to the next blank line, but it’s actually highlighting the whitespace in between lines (try pressing delete and see what happens).

    Double clicking at the end of the document must trigger some edge case and resets the cursor back to the start of the document

  26. CornedBee says:

    jEdit supports the Home+Home+Home and End+End+End features, although slightly different. The first press goes to the start/end of visible characters, the second to the start/end of the line (e.g. if a line is indented, the first Home goes to the start of the code, the second to the start of the line), and the third goes to the top/bottom of the currently visible area, i.e. as far up/down as possible without scrolling.

    To get to the start/end of the file, use Ctrl+Home and Ctrl+End.

    More on-topic, the Ctrl+Backspace is certainly a nice and useful feature, but to put it in the *shell auto-complete*, of all places, sounds very weird and more than a little worrisome to me.

  27. Igor says:

    Any tips, besides I’d learn to release shift in time?

    Yeah, if you can’t learn that then give up on computers.

  28. win32 4-ever says:

    Could you please describe how to use this kind of editbox from win32.

    [That’s not the point of the story, but the answer is in the story. -Raymond]
  29. Moblog says:

    Over the years, I’ve grown so accustomed to using many Windows related keyboard shortcuts that I intuitively use them without thinking. Looking at the list of keyboard shortcuts published by Microsoft for Windows XP, I know and use all of them. Lately,

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