How can I switch option (alt) and command (windows) keys for Windows 7 in Boot Camp?

I had this issue. Resolved it using Sharp Keys (free).

  • http://www.howtogeek.com/howto/windows-vista/map-any-key-to-any-key-on-windows-xp-vista/

I've been using AutoHotKey for about a year on Win7 Ultimate x64. Works great.

In addition to swapping the left Command and Option keys, I've remapped the right Command to forward delete, and right Option to "AppsKey" (aka, context menu) which helps in Visual Studio and other apps.

If you want function keys to work as, well, function keys (without having to hold down Fn), you can set that in the Bootcamp application via the system tray icon.

Here's a script just for swapping left Option (alt) and Command (Windows):

RAlt::AppsKey ; right-Option to context menu
RWin::Del ; right command to forward delete
LWin::LAlt ; left command to alt
LAlt::LWin ; left alt to command (windows key)

You may also consider remapping Caps Lock if you need an additional key since, really, how often do any of us use Caps Lock?


Here is a script file for the Apple keyboard with F hotkeys and CMD hotkeys too. https://github.com/stroebjo/autohotkey-windows-mac-keyboard


I didn't like Sharp Keys because it requires a restart to swap mappings. Other AutoHotKey scripts here had too much extra stuff for my needs. This AutoHotKey script is only the win key swap, plus a hotkey to turn it off (ctrl+F6) if you also occasionally use a Windows keyboard.