How to map Mac keyboard on Windows

I have bootcamp and I often change to windows for development but I always battle with keystrokes like copy and paste so I was wondering how I could map the CMD to Alt as this would make it conformable for me to work with.


I did it with AutoHotKey and SciTE4AutoHotkey

You can map key to another one or run a script with a shortcut.

1. Download and install the AutoHotKey app.

2. Download and install SciTE4AutoHotkey (It is a text editor with syntax highlight for AutoHotkey)

3. Run SciTEAutoHotKey and create a new .ahk file and save it in your Startup folder C:\Users\[USERNAME]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup. (So the script will be run when you start your computer)

4. Add your shortcut into the file. This is an example to map basic cmd key shortcut with ctrl key

#c::Send, ^c
#v::Send, ^v
#x::Send, ^x
#w::Send, ^w
#s::Send, ^s
#t::Send, ^t
#z::Send, ^z
#f::Send, ^f
#r::Send, ^r
#a::Send, ^a

you can also map other key depend your keyboard. For example i have a FR-CH Keyboard so I also add some rules like that:

!8::{
!9::}
!5::[
!6::]

5. Run the script

  • Go to C:\Users[USERNAME]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
  • Right click on your script and click Run Script

List of AutoHotKey Modifier Key Symbols

Symbol Key It Represents
^ CTRL
! Alt
# Windows Key (cmd in mac keyboard)
+ SHIFT

Read more on AutoHotKey Documentation


Keys under Windows can be remapped in the registry. There is a GUI tool that can do it - SharpKeys. There is an example of mapping CMD to Ctrl in BootCamp using this tool. I've also used the Microsoft Keyboard Layout Creator some time ago to build layouts for my Windows VMs that match the OS X layouts. One nice thing of MSKLC is that it creates installable layout packages that add to the system layouts (i.e. it doesn't hack on an existing layout) and you can activate those new layouts in the usual place in Control Panel. If I recall correctly, it can only remap usual keys (i.e. no Ctrl/Alt/Win remapping), but I may be wrong and it might still be worth to give it a try.