41

I use a Mac and if I press Alt+Backspace it deletes the entire word. This way it is simple for me to delete many words one after the other very quickly. May I use the same functionality on Windows 10? Mapping a shortcut to delete an entire word and not character-by-character?

Run5k
  • 16,044
  • 24
  • 51
  • 65
user11230
  • 497
  • 7
    FYI, you can use Ctrl+arrows to skip entire words, and with Shift added to the combo, you can select sentences much faster and with precision. Same should work on Mac. – user1306322 Mar 14 '18 at 07:52
  • 8
    Also, double-clicking and dragging without releasing the left mouse button from the second click will allow you to select entire words, including the one you clicked on. And triple-click selects whole paragraphs of text, dragging optional. – user1306322 Mar 14 '18 at 08:08
  • 19
    Just type daw and then . for the next word. You're using vim, right? – Eric Duminil Mar 14 '18 at 12:21
  • 7
    @user1306322 MIND == BLOWN. I've been a windows ("power")user for decades and was aware of double/triple clicking for words/paragraphs. Never realized it would work for dragging too. – RobIII Mar 15 '18 at 13:41
  • 1
    @EricDuminil The equivalent functionality in vim would be Ctrl-W in insert-mode. :) – JoL Mar 15 '18 at 18:20
  • It seems to me that many common Alt+(key) commands in Mac happen to be implemented as Ctrl-(key) in Windows, and Option-(key) commands in Mac happen to be implemented as Alt+(key) commands in Windows. – phyrfox Mar 16 '18 at 19:59
  • @phyrfox alt is the same as option on mac – pfg Mar 16 '18 at 22:21
  • @RobIII I actually found out about that while I was writing that comment. I knew about dragging the double-click and then thought "hmm… but what if I dragged the triple-click?" and it worked. So yea :p – user1306322 Mar 18 '18 at 22:45

4 Answers4

118

Please use Ctrl + Backspace on Windows to delete an entire word.

John Doe
  • 758
  • 4
    +1, because I didn't know this shortcut key. But it technically doesn't answer the question, but presents an alternative. You may want to add that to your question. – LPChip Mar 13 '18 at 22:51
  • 31
    It does answer the question - "Mapping a shortcut to delete an entire word" seems to be the goal. The Alt+Backspace is just an example from another OS. – Sir Adelaide Mar 14 '18 at 00:35
  • Thank you a lot! But it would be great if I could map the key either on osx or win so that I don't get confused since I switch the machine a few times a day – user11230 Mar 14 '18 at 00:41
  • 6
    @user11230 You can use Karabiner to configure various shortcut keys on Mac. But after years of tweaking configs on various systems, I would not recommend doing that. Just learn the defaults. That will train your context switching and your muscle memory. Eventually you will be able to use fresh installations and colleague's machines with ease. – joeytwiddle Mar 14 '18 at 07:22
  • 16
    Indeed, Ctrl has this effect, just like Ctrl+Arrow key moves the caret a word to the left or right, and Ctrl+Delete removes the word to the right of the caret. Shift+Ctrl+Arrow key expands the selection with a whole word to the left or right. Please notice that standard Windows Edit controls don't support Ctrl+Backspace, however, unless autocomplete is enabled. For instance, you will notice that Ctrl+Backspace works in the Run dialog (Win+R) but not in RegEdit's "address bar". – Andreas Rejbrand Mar 14 '18 at 07:48
  • @joeytwiddle thank you anyway for the answer. – user11230 Mar 14 '18 at 12:07
  • 2
    This is also working for me on Linux (Cinnamon). Bizarrely enough, it doesn't work in Windows' Notepad. – Marc.2377 Mar 15 '18 at 05:22
  • 2
    @MarcRanolfi it works in almost every Windows and Linux applications that use standard textboxes, except Skype and Notepad, which is a pain – phuclv Mar 16 '18 at 01:16
  • 2
    @LưuVĩnhPhúc Depending on the program it can have slightly different behavior though. Some programs Ctrl+Backspace will delete the whole previous word including the preceding space, some will leave the preceding space. – Brad Mar 16 '18 at 14:16
17

You can remap the hot key using AutoHotkey.

The following script will do it. Set it up to run on Windows start up or when you log in.

!BS::
Send ^{Backspace}

Note: On my PC, Alt-Backspace seems to be Undo, same as Ctrl-Z. AutoHotkey will replace the existing functionality while the script is running.

Sir Adelaide
  • 4,959
  • Thanks, i'll look into that even tho I would prefer a native solution – user11230 Mar 14 '18 at 12:08
  • Note that mapping this to the sequence Ctrl+Shift+Left, Del/Backspace should be a better variant, since Ctrl+Backspace is not supported in the default edit control, for example (cf. Notepad). – Joey Mar 14 '18 at 17:16
1

If you wanted to emulate the Alt + Backspace which deletes the word to the left of the cursor, it is possible that you would also want to emulate the Command + Backspace functionality, which deletes the line to the left of the cursor.

Assuming that you use the native Ctrl + Backspace Windows functionality to delete the previous word, you can remap Alt + Backspace to delete the previous line. This is especially convenient as on most Windows keyboards the Alt key is approximately in the same position as the Command key on Mac computers.

The following AutoHotKey script would achieve the aforementioned functionality:

!Backspace::
Send {Shift down}{Home}{Shift up}{Backspace}
return
0

Ctrl+Backspace to delete the word on the left of insertion point

Ctrl+Delete to delete the word on the right of insertion point