I’m not so concerned about getting the evil PC to look like a mac, but I do want it to act like a mac. I want to hit my usual Mac key sequences and have the usual things happen. Lovely user interface things like QuickSilver (command-space) are just a dream (but for a not-so-cheap imitation see ActiveWords). Cutting and pasting is a day-to-day activity.

In short, I wanted a command key so I could hit command-c and command-v for cutting and pasting. This virtual command key would actually be a control key in disguise, since control-c and control-v are the cutting and pasting commands in the evil OS.

Windows does have a rip-off of the command key—the Windows key—but no one uses it. (Apparently it’s so unpopular it’s even left off the keyboard on some Windows laptops.) In any event, it’s in the wrong place (in Alt territory), and the Alt key is where the command key goes on a Mac. So I had a lot of rearranging to do.

Before I get into sordid things like regedt32, I should mention that in the OS of Goodness and Light, you swap keys by downloading the free keyboard mapper uControl.

Maybe there’s a free and easy approach on Windows—anything’s possible—but if there is I couldn’t find it. So I went into the registry. You can get the general idea about the Scancode map registry key from an article on the Microsoft site, but it’s not for regedit beginners. The instructions here were clearer, and this PC World tip is pretty detailed, with a handy chart of the scan codes.

Despite all this good advice I managed to do it wrong the first time, turning my control key into caps-lock instead of the caps-lock into control. And I think alt turned into useless-windows-key instead of vice-versa. Messing up control and alt means you can’t Ctrl-Alt-Delete to log in, so the PC was in a bad way. I was wondering how I was going to explain my munged keyboard to the IT guy and hoping against hope that there was an easy Mac-style way to boot from a CD and roll out my registry backup, when I found the missing keys (by trying random combinations).

The second time I was much more careful about figuring out what went where. If you want to try this horribly dangerous, possibly fatal thing, here are my quick and dirty Mock Mac (with a side of Mock Sun) instructions:

Run regedt32 (from Start | Run). Drill down to

HKEY_LOCAL_MACHINESystemCurrentControlSetControlKeyboard Layout

From the menu, go to Edit | Add Value. The value will be of type REG_BINARY. Type in Scancode Map with type REG_BINARY. You’ll end up in a funny interface where you get to type two digits at a time. Here are the sequences you would type for various key swaps (single spaces and carriage returns inserted for clarity):

CapsLock -> Left Ctrl:
0000 0000 0000 0000
0200 0000 1d00 3a00
0000 0000
CapsLock --> Left Ctrl,  Left Ctrl --> CapsLock:
0000 0000 0000 0000
0300 0000 1d00 3a00
3a00 1d00 0000 0000
CapsLock->Left Ctrl, Left Ctrl->Left Alt, Left Alt->CapsLock:
0000 0000 0000 0000
0400 0000 1d00 3a00
3800 1d00 3a00 3800
0000 0000
CapsLock->Left Ctrl, Left Alt->Left Ctrl, Left Ctrl->Left Alt:
0000 0000 0000 0000
0400 0000 1d00 3a00
1d00 3800 3800 1d00
0000 0000
CapsLock->Left Ctrl, Left Alt->Left Ctrl, Left Win->Left Alt
0000 0000 0000 0000
0400 0000 1d00 3a00
1d00 3800 3800 5BE0
0000 0000

The final one is my Mock Sun + Mock Mac setup. You must reboot for the change to take effect. (Good luck logging back in.)

2 Responses to “Scancoding”

  1. Jerie Says:

    Or you could try Key Tweak

    I’m just sayin’…

  2. Jemima Says:

    Thanks! Now how can I tell whether I should trust it not to infect my computer with spyware or viruses? I’m just sayin’…uControl is a respectable SourceForge project.