30

Text fields in almost all software erase a word when ctrl+backspace is pressed. However, Notepad behaves differently, and inserts a character which is:
`` (I copy-pasted it here. I'm not sure if it is visible. It looks like a rectangle in Notepad.)

Here is a screenshot:

ctrl+bksp

  • What is this character?
  • Why does Notepad do this? Is it simpler to implement?
  • Are there other key combinations for other characters?
  • Is there a key combination in Notepad for erasing a word?

2 Answers 2

33
  1. It's 0x7F "Delete" in ASCII and U+007F "Delete" in Unicode.

  2. It's in fact lack of an implementation. Plain Backspace sends an ASCII 0x08 (I'm not sure how the Edit control handles it internally), and it is not uncommon in various operating systems for CtrlBackspace to send the "Delete" sequence.

    The "delete word" behavior was added later, as an undocumented feature, and only to those Edit controls which use "SHAutoComplete". If a textbox has autocompletion disabled, CtrlBackspace will likely not work.

    (SomeMany programs implement their own text editing controls, which work slightly differently from the built-in one.)

  3. CtrlJ and CtrlM will get translated to a newline (^J is CR in ASCII and ^M is LF; however, the Edit control translates both keypresses to CR+LF.) Similarly, CtrlI inserts a Tab character.

    Ctrl_ and Ctrl^ will result in somewhat useless "Unit separator" (^_) and "Record separator" (^^).

    (The ^X notation means the Ctrl key – Ctrl-X in this example – in ASCII this is equivalent to unsetting the 7th bit of the following character.)

  4. No, but you can use CtrlShift← Left to select the previous word, and overwrite by typing.

    Or get a better Notepad.

4
  • Thanks for the response grawity. But I don't understand why you rejected @RJFalconer's edit. [Ctrl][Left] does not select without [Shift].
    – musa
    Sep 6, 2011 at 6:48
  • @musa: I didn't, that just happens when two people are editing at once. Sep 6, 2011 at 7:36
  • Just for the record: Notepad2 has exactly the same problem in the Find and Replace Text dialogs that Notepad(++) has, Ctrl-Backspace does not delete the previous word. The workaround works perfect, thanks.
    – Michael S.
    Sep 5, 2018 at 4:05
  • @user1686 The "undocumented feature" link doesn't lead anywhere useful (archive content notification).
    – rory.ap
    Apr 3, 2020 at 17:27
8

Ctrl-Backspace to delete a word in Notepad has been finally been implemented!

See the changes to Notepad in Windows 10 version 1809. Here

1
  • 1
    Wow, finally! Even though I rarely use plain notepad (when I forgot to change the default app to open with) I‘m still annoyed. I should install this update then. For anyone coming here in the future: 1809 was rolled out in November 2018.
    – bugybunny
    Jan 15, 2019 at 10:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .