Microsoft Windows: Swap Caps Lock, Alt, Control Keys

By Xah Lee. Date: . Last updated: .

How to swap Lock and Control key?

Install AutoHotkey, and create a file with the following content, then double click the file.

; AutoHotkey
; make capslock do control

How to swap Alt and Control keys?

; AutoHotkey
; swap alt and control

To install AutoHotkey, see: AutoHotkey Tutorial

See also: Useful AutoHotkey Scripts

Buy a Gaming Keyboard

Best solution for setting keys is to buy a programable keyboard, because it's easy to define keyboard shortcuts and hassle free.

See: Programable Keyboards with Onboard Memory


  1. AutoHotkey Tutorial
  2. AutoHotkey Key Syntax
  3. Useful AutoHotkey Scripts
  4. Swap Caps Lock, Alt, Control Keys
  5. Toggle Maximize Window

If you have a question, put $5 at patreon and message me.