Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to switch the Ctrl and Alt keys in Windows XP. I created an AutoHotKey script that contains the following:



This works, but the only problem is that the Alt-Tab switcher gets stuck. When I release Alt-Tab, the window switcher stays up until I hit another key or click the mouse.

Does anyone know how to fix this problem?

share|improve this question

I would like switch Alt and Ctrl because I'm currently a Mac user on Window (with a PC keyboard). All hotkeys on Mac: Cmd+n, Cmd+w ... -> PC: Ctrl+n, Ctrl+w and Cmd got same place as Alt key.

I found a non perfect solution:

Map all letters like that :

LAlt & a::Send {LCtrl Down}{a}{LCtrl Up}
LAlt & z::Send {LCtrl Down}{z}{LCtrl Up}
LCtrl & a::Send {LAlt Down}{a}{LAlt Up}
LCtrl & z::Send {LAlt Down}{z}{LAlt Up}

And you will keep Alt+Tab and AltGr functional

This is my full implementation (non complete):

share|improve this answer
Do you have problems with this causing the key-up for alt being missed? It's definitely happening for me. – Sophistifunk Nov 27 '12 at 5:40

I was looking for the same thing and found something that works without plugins or other programs. You can do it using the registry as described here.

Alternatively, just create 2 reg files. First the file for switching the Ctrl Key to Alt.


This adds the necessary key to the registry.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1D,00,38,00,38,00,1D,00,00,00,00,00

And then the file for switching the Alt back to the Ctrl key.


This removes the necessary key from the registry.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=-

After double clicking the reg-file you need to restart and you're good.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.