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 gaming keyboard, because it's easy to define keyboard shortcuts and hassle free.

I recommend:

logitech g710plus keyboard
Logitech G710+ Mechanical Keyboard


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