Skip to content

Instantly share code, notes, and snippets.

@roryokane
Created August 26, 2013 21:19
Show Gist options
  • Star 30 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save roryokane/6346782 to your computer and use it in GitHub Desktop.
Save roryokane/6346782 to your computer and use it in GitHub Desktop.
AutoHotkey script to fix Ctrl+Backspace (delete previous word) in File Explorer and Notepad
; 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
@coezbek
Copy link

coezbek commented May 16, 2022

@lihuelworks What update to the script are you suggesting?

@Zain-Sajjad
Copy link

I am runnnig the script but nothing is happening.

@JuaniElias
Copy link

I've updated this for AHK v2

; Ctrl + Backspace works in File Explorer and Desktop
#HotIf WinActive("ahk_exe explorer.exe")
^BS::Send("^+{Left}{Del}")

This seems to work fine for now

@lihuelworks
Copy link

I've updated this for AHK v2

; Ctrl + Backspace works in File Explorer and Desktop
#HotIf WinActive("ahk_exe explorer.exe")
^BS::Send("^+{Left}{Del}")

This seems to work fine for now

Can't react but works like a charm, thank you 🙌🏻🙌🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment