24

I'm used to a Mac keyboard and that means my finger expect to find the shortcut key to the left of the spacebar. How can I turn the Windows key--command () key on a Mac keyboard) into the Control key and vice versa?

24

Quite simply, use this AutoHotKey script

RCtrl::RWin
RWin::RCtrl
LCtrl::LWin
LWin::LCtrl

Works for all but CtrlAltDel.

A workaround for allowing simultaneous CtrlAlt, is to map left to right, and right to left (as opposed to left-left, right-right) i.e..

LAlt::RCtrl
RAlt::LCtrl
RCtrl::LAlt
LCtrl::RAlt
  • Such a good solution! Great open source software there! :) – James Bedford Sep 13 '12 at 16:28
  • bottom section does not work anymore, gives an error of duplicate keys, i tested this on windows 8.1 on a macbook air and ctrl alt del works normally without a script – JqueryToAddNumbers Dec 11 '14 at 4:36
  • 2
    I like that I've googled this and come here myself 7 years later... – jay Jan 28 '17 at 13:42
  • I just used LWin:LCtrl, as I don't use RWin for Control much. Nice suggestion. – Vijay Vepakomma Nov 27 '17 at 22:06
  • On my Lenovo Ideapad 110 W10 Xmas 2017 special, the uparrow key is where every other shift key in the world is located. So I swapped them using AutoHotKey: pastebin.com/eEYb7kT1. I had to start the script with 'Run as Administrator' so that programs started as administrator (say, cmd.exe) would see the remapping. – john v kumpf Jul 13 '18 at 19:44
3

How-to Geek has a nice solution for your request:

Map Any Key to Any Key on Windows 7 / XP / Vista

  • 1
    This is a great solution since there isn't a built in option in the Windows control panel. – James Watt Apr 28 '10 at 12:47
  • This won't work as SharpKeys (which that page tells you to install) won't let you swap two keys! – Mike Jun 14 '14 at 5:35
  • 1
    @Mike Worked for me. – Drazen Bjelovuk Sep 27 '14 at 18:41
2

Take a look at this AutoHotkey script that pretty much brings the mac keyboard experience to Windows.

https://github.com/stroebjo/autohotkey-windows-mac-keyboard

This AutoHotkey configuration file makes usual keyboard shortcuts work with an Apple keyboard on Windows. It has been testet with a german keyboard layout, but should work under different layouts as well.

2

SharpKeys

SharpKeys is a utility that manages a Registry key that allows Windows to remap one key to any other key.

Apply Key Swap

Swap the Ctrland Alt keys through a two step process. Using SharpKeys, map:

  1. Left Alt (00_38) to Left Ctrl (00_1D)
  2. Left Ctrl (00_1D) to Left Alt (00_38)

Presumably you can do similar things to a right Alt and a right Ctrl.

Note: the documentation for the utility provides the following caveat:

Things that SharpKeys +will not+ do:

Allow you to swap two keys with each other - e.g. you can’t have Q and Z swap places because the remapping code would get confused

What this means I do not know so be careful. Any time you modify the registry things can go wrong. In this case, the author of the utility suggests that it's not possible to do what I just did so it could be that I'm misinterpreting what he wrote, he was wrong, it is possible to do this but only for Ctrl and Alt, or I just messed up my computer.

I successfully applied the two step remapping to Windows 10 as of 2017/04/21.

Remove Key Swap

By choosing Delete All and following that up with Write to Registry in SharpKeys I was able to delete the registry key that SharpKeys created in the first place. You could also manually delete the relevant registry key using regedit.

Background

How to Disable Caps Lock Key in Windows 7, 8, 10, or Vista provides a nice explanation of the registry key that SharpKeys modifies (creates?). I've posted my registry key FYI.

After SharpKeys ran, my registry key:

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\Scancode Map

Contained:

00 00 00 00 00 00 00 00 03 00 00 00 1D 00 38 00 38 00 1D 00 00 00 00 00

A separate SuperUser question provides a bit of extra context: How to remap Right-Win and Right-Alt keyboard keys and Mehper C. Palavuzlar's answer to this question pointed me in the right direction. Rather than edit his question, I thought it more appropriate to post my answer as a separate answer.

Editorial comment

It does feel nice to be able to do cut, copy and paste with the thumb and Alt rather than the awkward pinky reach required with the Ctrl key in Windows. But, even though I grew up a Mac user (25 years) and would dearly love to be able to use my thumb (a natural position) to activate short cuts in Windows, I think it'll be too confusing to do a whole-sale swap of Ctrl and Alt for me. For example, Command/Alt-Tab are in the same spot so remapping Alt-Tab to Ctrl-Tab just won't work. Too bad that Apple made the right decision (thumb-based short cuts) and Microsoft went with the not-so-logical "industry standard" of its day. But, I guess "industry standard" is how we ended up typing with QWERTY and all its inglorious variants in the first place.

PS Windows still has three command keys?! Apple's solution of one modifier key for special letters and one for short cuts was a sensible design choice and allowed for easy access to less common (in English) but still important symbols and diacrits (e.g. °, ´, ¸, ˆ, ¨). In Windows you've got Ctrl, Alt and Windows all doing essentially the same thing and, I find that the vast majority of users rarely, if ever use the Alt or Windows shortcuts. Plus Alt gets especially confusing since it's sometimes a method to enter non-standard characters with the keypad or with AltGr but it's also a short-cut modifier at times). But, I digress... I've inspired myself to search for or ask an actual question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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