Skip to content

Instantly share code, notes, and snippets.

@nightsparc
Forked from AdrienVR/FixCtrlBackspace.ahk
Last active December 28, 2022 13:04
Show Gist options
  • Save nightsparc/93346fe793f110abb850f128b8bc3dc3 to your computer and use it in GitHub Desktop.
Save nightsparc/93346fe793f110abb850f128b8bc3dc3 to your computer and use it in GitHub Desktop.
AutoHotkey script to fix Ctrl+Backspace (delete previous word) in File Explorer and Desktop (AHK V1)
; source: https://gist.github.com/AdrienVR/4136db1bfb0d3d3490b0d1e23e56daf9
; context: http://superuser.com/a/636973/124606
#NoEnv
; Reloard script if not used
; https://www.autohotkey.com/docs/v2/lib/_SingleInstance.htm
#SingleInstance force
; https://www.autohotkey.com/docs/v2/lib/SendMode.htm
SendMode Input
#IfWinActive ahk_exe explorer.exe
^Backspace::
#IfWinActive ahk_class Progman ; Desktop
^Backspace::
;#IfWinActive ahk_exe ditto.exe
; ^Backspace::
Send ^+{Left}{BackSpace}
#IfWinActive
; how to write scripts: http://www.autohotkey.com/docs/
;
;
; 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
; how to write scripts: http://www.autohotkey.com/docs/
@nightsparc
Copy link
Author

Added support for Windows Desktop as suggested by iwconfig in the original rorykane gist, basically copied from the forked gist by mshuffet

@nightsparc
Copy link
Author

Only send the command once...

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