Using AutoHotKey to assign a different function to Capslock (Windows)

Make your Capslock key the most useful key on the keyboard

2026-03-10

The Capslock key takes a prime position on modern keyboards, even though the function it is assigned to hardly seems to justifies this. DO YOU OFTEN WRITE LONGER WORDS OR SENTENCES IN CAPS??? Neither do I.

A much better use for Capslock is to use it as a second control key [Ctrl]. When my fingers rest on the home row (you touch typists know what I am talking about) my left hand's pinkly finds it much easier to reach Capslock then the original control key. There is a second use for the Capslock key that I got used to. When I press and then release the Capslock key without pressing any other key in combination, it would minimize the active window.

On Windows I am using the following script for AutoHotKey (AHK) to remap the Capslock key:

;; Remap Capslock to C- . If pressed individually and released it 
;; minimizes the active window.
#InstallKeybdHook
SetCapsLockState, alwaysoff
Capslock::
Send {LControl Down}
KeyWait, CapsLock
Send {LControl Up}
if ( A_PriorKey = "CapsLock" )
{
    WinMinimize,A
}
return

aut


[📧 Let me hear your thoughts on this post] [👆 Back to top] [🌐 Back to homepage]