62

When I press Ctrl+Backspace, sometimes a small square is inserted, instead of the entire word being erased.

The problem only happens in some text boxes; in others the shortcut works like it should.

  • Start menu search box: works

  • Notepad: doesn’t work

    small box created from Ctrl+Backspace in Notepad

  • Notepad2: works

  • Firefox: works

I’m running Windows 7 x64.

4
  • 1
    I get the same behavior in notepad in WinXP.
    – djhowell
    Aug 31, 2009 at 20:08
  • 3
    I also get this behavior when renaming a file in File Explorer on Windows 7. That is, when I select a file, press F2, move the cursor to the end of the word I want to delete, and try Ctrl+Backspace. Aug 26, 2013 at 21:35
  • 2
    fyi Windows 10 1809 (October 2018 update) fixed this in their notepad application. howtogeek.com/353165/…. I would really wish they would finally fix this in Windows Explorer.
    – bugybunny
    Mar 6, 2020 at 10:25
  • 1
    Also renaming in Windows 10 (F2 then CTRL + Backspace) still gives the same behavior.
    – Avatar
    Aug 30, 2020 at 4:53

5 Answers 5

35

You can fix this behavior by overriding the Ctrl+Backspace shortcut using AutoHotkey. Save the following code in a plain text file with the given filename and extension, then launch the script with AutoHotkey:

FixCtrlBackspace.ahk

; how to write scripts: http://www.autohotkey.com/docs/

#IfWinActive ahk_class CabinetWClass ; File Explorer
    ^Backspace::
#IfWinActive ahk_class Notepad
    ^Backspace::
    Send ^+{Left}{Backspace}
#IfWinActive

; source and context: http://superuser.com/a/636973/124606

; relevant documentation links:
; writing hotkeys
; http://www.autohotkey.com/docs/Hotkeys.htm
; list of key codes (including Backspace)
; http://www.autohotkey.com/docs/KeyList.htm
; the #IfWinActive directive
; http://www.autohotkey.com/docs/commands/_IfWinActive.htm
; the Send command
; http://www.autohotkey.com/docs/commands/Send.htm

You may find it easier to download this script file from GitHub, rather than creating the file and pasting in its contents yourself.

To launch this script automatically on startup, add a shortcut to it to the Startup folder in your Start menu, as described in How to Make a Program Run at Startup on Any Computer.

The basic idea of the script is this:

^Backspace:: Send ^+{Left}{Backspace}

This changes the Ctrl+Backspace shortcut in all programs so that it is equivalent to pressing Ctrl+Shift+, to select the previous word, and then Backspace, to delete it.

This select-and-delete workaround, while better than typing a box, is brittle. It’s safer to not enable this shortcut in programs in which Ctrl+Backspace already works. That’s why I use #IfWinActive to limit the hotkey to only programs that I know don't support that shortcut.

2
  • If you only need Windows Explorer: #IfWinActive ahk_class CabinetWClass ; File Explorer ^Backspace:: Send ^+{Left}{Backspace} #IfWinActive
    – Avatar
    Aug 30, 2020 at 5:00
  • I stuck a Return after Send ^+{Left}{Backspace} as I was having issues. That seems to have fixed them.
    – Ste
    Aug 19, 2022 at 21:40
28

The "box" you're seeing is what is known as a control character. The box is displayed because, as you've discovered, not all programs handle the ctrl+backspace to remove a word.

This control character is one of 33 "non-printing" characters in the 128 character ASCII character-encoding scheme.

4
  • Just wanted to add that some applications handle it even worse and actually don't display the control character. You can see this when nothing happens with ctrl+backspace and pressing delete seems to do nothing. I think notepad for Vista did this.
    – Joshua
    Aug 31, 2009 at 20:19
  • 8
    The character inserted is 127 - the delete character.
    – ugh
    Aug 31, 2009 at 20:25
  • 1
    Link to ASCII char 127, the delete character, on Wikipedia Aug 26, 2013 at 16:20
  • This explains the obvious 'what', but not 'why' :-(
    – mafu
    Nov 4, 2015 at 8:33
18

Found this on an MSDN blog...

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.

So it sounds like if the application does not use SHAutoComplete it will not support the feature unless it has been explicitly added by the application's author.

P.S. control-delete removes the word ahead of the cursor

2
  • 1
    Also on this same article, reading through the comments adds a little bit more insight: blogs.msdn.com/oldnewthing/archive/2007/10/11/…
    – heavyd
    Aug 31, 2009 at 20:17
  • 1
    So the developers of "Windows Explorer" haven't added "SHAutoComplete" to the renaming action for more than a decade?! ... Unbelievable.
    – Avatar
    Aug 30, 2020 at 4:55
0

I had the issue with Outlook 1908 after Windows 10 update 1909 (November 2019 update).

I restarted Outlook and it fixed the problem.

-2

Not all applications handle keyboard shortcuts the same. Notepad doesn't seem to handle this key combination and handles it in its own way.

You must log in to answer this question.