Make work in Windows on Mac a joy

Jun 21, 2015

Preambula

My old MacBook Air pass out, so I got a new MacBook a week ago.
I never feel need in virtualization to play games or do something else on my old MacBook.
I had my transparent terminal to play with new cool stuff, my chrome browser with smooth two-finger scroll,
iMovie to ocasionally make clips and that was about everything I ever used.

Since I work almost 3 years at Microsoft, I acquired some taste for Windows systems.
And when Bruce asked me when I’m going to run PowerShell on my new laptop,
I thought it would be cool to install Windows 10 preview as a second system.
I had no idea what is bootcamp and even was not sure is it possible to have two systems on Apple’s hardware.
Advantures time!

Disclamer: I was not able to install Windows 10.
I know that it’s possible.
I cannot figure out how to install bootcamp drivers for trackpad and keyboard for installation stage.
I cannot go further then language select screen. Instead, I run Windows 8.1 now.

I don’t have any disire to describe this somwhat straigforward process of bootcamp installation.
It still requires a lot of googling and retries, but there is nothing interesting about it.

What is interesting is the fact that once I start playing around with Windows 8.1 on Mac hardware
(by hardware I primerely mean keyboard and trackpad as well as retina display),
I quickly reilize that it’s ass.

Don’t get me wrong: I actually like Windows 8.1 (and Windows 10 preview looks even better, except stability).
But it just feels soooo wrooong on MacBook.
Keyboard shortcuts, trackpad momentum, brighness control.
Nothing just work as expected.
That’s why I defined an Uber Goal: make Windows expirience as close to OS X as possible.

My receipe to make Windows on Mac a joy

Short cuts

Goal: rebind keyboard to use standart Mac shortcuts.

After installing Windows on Mac via bootcamp, Command (⌘) key becomes Win key.
It totally makes sense … for somebody who never work on Mac.
Most essential Mac short cuts (copy / paste, close program, change keyboard layout) use ⌘.

First requirement: rebind Win key to Left Ctrl key.

It’s possible to do with HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\ScancodeMap registry key.

The date format is somewhat straighforward,
but it’s binary and uses keys hex identifiers.
It’s much easier to use SharpKeys utility to do math and edit registry for you.

I recommend swapLeft Ctrl and Win key (add the second entry), because Win is part of some useful short cuts itself.
It also bring start screen and I use it all the time for applications quick lunch.

We are already in a pretty good shape:

⌘ C / ⌘ V (copy / paste).

⌘ 1 / ⌘ 2 / ⌘ 3 (to select tab in a browser).

⌘ W (to close tab).

already work as expected.

Better short cuts

One thing that I found extremely annoying is AltTab.
I want it to be the same as OS X: ⌘ Tab.
But I cannot achive it with the same registry trick: it would conflict with my existing binding.
We need a way to rebind combinations.

I found the solution in AutoHotKey.
I was particularly interested to try it out, since one of their tag-lines is “Fast scriptable desktop automation with hotkeys” (khm khm PowerShell).

It turns out that to rebind AltTab on Windows 8.1 you need a little bit more ceremony.
Once you done with patching AutoHotKey.exe with AutoHotKey.exe,
you can create a .lnk file in your ~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup directory to automatically run script on the system startup.

UPD: Use C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp directory to enable it for all users.

On my system “Target” is "C:\Program Files\AutoHotkey\AutoHotkey.exe" C:\dev\AutoHotkey\WindowsOnMac.ahk

Brightness

Better trackpad

It’s a little bit painful to install TrackPad++ (especially read Web-1.0-site),
but it adds innertial movement to trackpad two-finger scroll.
So I cosider it worth mentioning.
Just be awere that it doesn’t fully work in Google chrome (only Firefox and IE 11), which is Google’s fault.
I found that IE 11 with TrackPad++ provides pretty good scrolling expirience. Not as good as native Apple’s Safari, but a decient one.