Switch Control and Alt buttons in Windows

If are an Apple fan but use Windows (perhaps via Boot Camp or Parallels Desktop or – like me – at work), you may find that you often hit Alt instead of Ctrl, as much of the Windows Ctrl key functionality is present in Mac’s Cmd key functionality, located it the same place as Windows Alt key. The solution is to swap the positions of the left Alt key with the left Ctrl key. Here’s how.

(If you are searching to swap, trade, or exchange the Cmd or Command and Ctrl or Control in Windows, as typical Mac or OS X user, this is the right place to be.)

While Windows does not let you swap modifier keys as does Mac (go to System Preferences, Keyboard, and Modifier Keys), there is a program called AutoHotKey which makes it easy. I introduced this program in a previous article here on AlanHogan.com. If you do not have AutoHotKey, download and install it on Windows.

The second step is to save the code below as swap-alt-ctrl.ahk on your Windows computer.

We also want to make sure this file is run by AutoHotKey every time you log in. We can do this by placing the .ahk file in your startup folder. To find this folder, open the Run prompt (Windows key + R) and type shell:startup. Hit Enter or click OK. You should now see your Startup folder. Just place your swap-alt-ctrl.ahk file here.

Now whenever you log in, your left (and only left) Ctrl and Alt keys will be switched!

; This file by Alan J. Hogan
; https://alanhogan.com/tips/swap-left-alt-and-ctrl-keys-in-windows
; Switches the left Control and Alt keys.


It’s been ten years since I shared this tip and I have not regularly used Windows since then. Still, this page remains one of my most popular. I have updated this old Windows XP-centric tip so that the setup instructions work just fine with the redesigned Start Menu of Windows 10 (and with Windows 7, for that matter). Feedback is always welcome, especially if I have missed something.

July 10th, 2007. (Updated: August 17, 2017 at 9:33pm.)
Alan Hogan (@alanhogan).  Contact · About