Windows – Switch Ctrl and Alt with AutoHotKey without messing up the Alt-Tab switcher

alt-tabautohotkeykeyboard shortcutswindows xp

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

LAlt::LCtrl
RAlt::RCtrl

LCtrl::LAlt
RCtrl::RAlt

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?

Best Answer

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): http://www.pastie.org/1660132