Last active
December 23, 2023 17:23
-
-
Save samvv/ec705a91ba44c1d027517bf644499425 to your computer and use it in GitHub Desktop.
Make control a secondary escape-key on Windows using AutoHotKey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; New version based on author fwompner gmail com in the Vim wiki | |
; https://vim.fandom.com/wiki/Map_caps_lock_to_escape_in_Windows#AutoHotkey | |
#Requires AutoHotkey v2.0 | |
#SingleInstance | |
SetCapsLockState "AlwaysOff" | |
*Capslock:: | |
{ | |
Send "{LControl Down}" | |
KeyWait "CapsLock" | |
Send "{LControl Up}" | |
if ( A_PriorKey = "CapsLock" ) | |
{ | |
Send "{Esc}" | |
} | |
return | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment