Thursday, May 20, 2010

>Making Windows Keyboard Feel like OS X

I have been unfortunate enough to have to start working with Windows on my Mac. I am using Bootcamp and VMWare Fusion. If I only need to make minor changes I can boot the Bootcamp partition via VMWare so I don’t have to reboot the computer every time I have to use Windows. VMWare allows me to customize my mappings to send the keys that I am used to using, so if this was the only way I was using Windows, that would be quite alright.

Since I need to develop in Visual Studio, using VMWare is only an option for very small projects, or the whole experience will become painfully slow.

Bootcamp does not support remapping the keys. Agony! Well, I found a solution.

Remapping Keys

I am using a US keyboard layout, your key mappings may be different.

SharpKeys is a tool that helps you perform some registry hacks, to allow me to remap the keys that I want to change.

I use it to remap the Alt and Windows keys, since they are reversed on the Mac. I also move the “`~” down to the bottom left corner where “|" usually are on Windows. “|" are in two different places on a US layout, I don’t know why.

Now that I have finished remapping the keys, I am done using SharpKeys. Now all I have to do is to get the Windows key to behave the way they do on the Mac on not like Windows keys.

Setting up the Shortcuts

The first thing to do is to disable the normal WindowKey functions. Here is a guide.

AutoHotKey is a tool the lets you remap the functions that are sent when a key is pressed. It can do a whole lot of other cool stuff too, so I encourage you to check it out even if you are not using a Mac. It is a great automation tool.

Here is my shortcuts.ahk file. I remap all my CMD-actions to the WinKey, and I also remap the Win- Left, Right, Up and Down to the corresponding Mac shortcuts.

#SingleInstance force
#a::Send ^a
#b::Send ^b
#c::Send ^c
#f::Send ^f
#n::Send ^n
#o::Send ^o
#p::Send ^p
#q::Send !{f4}
#r::Send ^r
#s::Send ^s
#t::Send ^t
#v::Send ^v
#w::Send ^{f4}
#x::Send ^x
#y::Send ^y
#z::Send ^z

#Left::Send {Home}
#Right::Send {End}
#Up::Send {PgUp}
#Down::Send {PgDn}

After this is done it is OK, almost, to start working. The sad part is that this configuration only works with an external keyboard. I couldn’t get the internal keys mapped properly on my Macbook Pro. But at least it is working.

1 comment:

membrane switch said...

Compatibility is an issue in devices like these. You need to be careful in choosing which ones to implement.