Apple/Mac Keyboard in Windows (non 10-key edition)

Using a Mac Keyboard with a PC is quite nice once you get a few things straightened out. I used a Mac for a few years so this configuration favors Mac to Windows users. This configuration works for Windows XP, Windows Vista and Windows 7.

For seamless integration you need to download three (3) programs:
-> KeyTweak - Bring back the Delete key
-> PrtScr - For Print Screen functionality (No F13 on the compact wired/wireless keyboards)
-> AutoHotkey - Create shortcuts for missing keys including the media keys and eject key

Add an optional fourth program to make launching applications easier:
-> Launchy, like quicksilver for OSX...

Remap your Right Option/Alt key to Delete

This is hugely beneficial and almost required unless you want to use your eject key as the delete key instead. I find the right alt key to be in the best position for deleting text as a programmer.

  1. Launch KeyTweak

  2. On the virtual keyboard, click on key #62

  3. In the Keyboard Controls section, click the Choose New Remapping drop down and choose Delete

  4. Click the Remap Key button

  5. Click Apply. Changes will be applied, you can cancel out of the dialog or reboot, your choice.

Make Print Screen work

Using the on screen keyboard is not very feasible. Instead, you can use a print screen program and map that to a key using AutoHotkey in the next step.

  1. Install PrtScr
  2. Configure PrtScr

Remap the rest of your keys using AutoHotkey

For simplicity, use these configuration files as a starting point and remove/change as necessary. See the AutoHotkey documentation for more customization options.

  1. Install AutoHotkey, defaults are fine

  2. Extract these files into your AutoHotkey folder (C:\Program Files\AutoHotkey\ in Windows XP)

  3. Run AutoHotkey (hopefully the script won't throw any errors)

Here's what you get:

Mac Key Emulation (Win = Command)
Win+ASelect All
For programs that support them
Win+WClose Window
Win+QClose Program
Media Keys
Win+F3Print ScreenRequires Prt-Scr Installed and mapped to Print Screen key. Tip: After pressing Win+F3, Alt Drag will draw on the screen, Ctrl Left Mouse will draw a box. Upon releasing the mouse the image will be in your clipboard. You can configure the default action in the program settings.
Win+F4Sleep...if you computer supports it
Win+F7Previous Track
Win+F9Next Track
Win+F11Volume Down
Win+F11Volume Up
Special Key Emulation and Overrides
Win+UpPage Up
Win+DownPage Down
Right AltDelete
EjectEject or DeleteProvided by the Apple Wired Keyboard.ahk. Rename the Apple Wired Keyboard.Delete.ahk to Apple Wired Keyboard.ahk if you want to use it as a delete button

I have been using this combination for about two years. The setup is incredibly effective. The only key that doesn't work period is the "fn" key. It doesn't register at all in Windows.

20110426: Someone had an issue with the "Pause/Break" key missing. I would suggest mapping that to the eject key if you're not using it.

1 comment:

schultkl said...

Looks like file "Apple Wired Keyboard.ahk" no longer works out of the box with v1.1.11.02.

I moved the "cleanup" code, replacing the "goto" call, which AutoHotkey complained about (no longer able to jump outside the function, I think). After that, everything worked.