I recently picked up, and am liking, the new “wafer thin” aluminum keyboard from Apple. Its very small, I like the key action and it’s very solid considering it’s size and thickness. But, I use it on Windows, and there’s no driver available other than the standard keyboard one, so the extra keys like media controls aren’t enabled. I came across a freeware macro program called AutoHotKey that works very nicely, and wrote up a few little scripts for it. You can download AutoHotKey and run the scripts yourself, or you can download the compiled version here [enable_mac_aluminum.zip, 193KB] and just pop it into your Startup folder.
Commands:
Shift-F3: Print Screen
Shift-F4: Task Manager
Shift-F7: Previous Track (in Winamp or Yahoo! Music Jukebox)
Shift-F8: Pause/Play (in Winamp or Yahoo! Music Jukebox)
Shift-F9: Next Track (in Winamp or Yahoo! Music Jukebox)
Shift-F10: Mute/Unmute
Shift-F11: Volume Down
Shift-F12: Volume Up
Windows-s: Open http://www.efsavage.com
Here’s the entire script:
#s::Run www.efsavage.com
+F3::Send {PrintScreen}
+F4::Send, {SHIFTDOWN}{CTRLDOWN}{ESC}{SHIFTUP}{CTRLUP}
+F7::
IfWinExist ahk_class Winamp v1.x
{
ControlSend, ahk_parent, z ; Pause/Unpause
return
}
IfWinExist ahk_class YMPFrame
{
SetTitleMatchMode 2
IfWinNotActive, Yahoo! Music Jukebox
WinActivate
WinWaitActive, Yahoo! Music Jukebox
MouseClick, left, 29, 107
Sleep, 100
MouseClick, left, 112, 76
WinMinimize
return
}
return
+F8::
IfWinExist ahk_class Winamp v1.x
{
ControlSend, ahk_parent, c ; Pause/Unpause
return
}
IfWinExist ahk_class YMPFrame
{
SetTitleMatchMode 2
IfWinNotActive, Yahoo! Music Jukebox
WinActivate
WinWaitActive, Yahoo! Music Jukebox
MouseClick, left, 29, 107
Sleep, 100
MouseClick, left, 30, 77
WinMinimize
return
}
return
+F9::
IfWinExist ahk_class Winamp v1.x
{
ControlSend, ahk_parent, b ; Pause/Unpause
return
}
IfWinExist ahk_class YMPFrame
{
SetTitleMatchMode 2
IfWinNotActive, Yahoo! Music Jukebox
WinActivate
WinWaitActive, Yahoo! Music Jukebox
MouseClick, left, 29, 107
Sleep, 100
MouseClick, left, 148, 79
WinMinimize
return
}
return
+F10::Send {Volume_Mute}
+F11::Send {Volume_Down 3}
+F12::Send {Volume_Up}
Update: Reader Svolte points us to SharpKeys, which (by default) maps F13 to print screen. The advantage of doing this is that alt-print-screen (capture just active window) works, while I was unable to replicate with the AutoHotKey script.
[...] Enabling Buttons on Apple Keyboard in Windows [...]
Thanks so much for this script. I’m not vey tech saavy, so may I ask what the startup folder is, and how I access it? Thank you.
Ah, that was a great help. Found your site via Google when trying to find out a good app that will allow me to set up certain keyboard hotkeys on the Apple keyboard to do certain things. Thanks!
Thanks alot
Thanks alot
you’re awesome thanks so much! you just made my life a whole lot easier
this is great. thanks. i picked up the keyboard today and was wondering how to do some tasks like print screen. any chance you will create more scripts?
[...] Enabling Buttons on Apple Keyboard in Windows – If you use AutoHotKey, Eric F. Savage shares an alternate way to get extended functionality. Ben Vinegar also has an article along the same lines. [...]
This is fantastically helpful. Much appreciated.
A friend one of mine just picked one of these keyboards up but doesn’t have a Mac. Assuming you have access to a Leopard disc (or the Boot Camp drivers), there’s an alternative way to make the media keys work, however, it doesn’t allow total customization (but does use the actual Apple software):
http://smallcomputing.net/2008/09/16/how-to-apple-aluminum-keyboard-in-windows/
Cheers.
Word of warning for the Boot Camp method: The Boot Camp software kept trying to write to my BIOS to tell it which OS to boot into, thus erasing the BIOS on bootup. Very frustrating! Also, the keys were very haphazard – sometimes Eject showed the nice picture and did nothing, other times the volume keys didn’t respond at all.
Autohotkey, for lack of Apple’s pretty OSD, is a more reliable solution.
Also, F14 works as Print Screen without any remapping, in case you were wondering
[...] Apple also included additional function keys assigned ot the F1-12 keys. Since I’m using Windows XP, I had to get drivers or use third party software in order to get the media and volume keys working. I tried using the Bootcamp drivers, but for me, Windows didn’t like it. So, I had to resort to using a small piece of free software called AutoHotKey. Paired with the correct script, the media controls work great! You can find the script and additional details at Eric Savage’s blog. [...]
Hey man, thanks a lot for the compiled .exe. I was freakin looking everywhere for this and the Boot Camp drivers refused to play with Windows. I left you a link on my blog in my Apple Aluminum Keyboard Review post.
- Eric
You can also use SharpKeys to change the function of buttons, for example to make the F13 print screen, I can really recommend it
hey Erik
I have tried your macro and the shift+F4 works well, but I have a hard time getting the mute, volume up/down to work. It seems a bit flaky at best.
hmmm okey .. just did some testing!
This is a bit strange. To get mute and volumecontrol to work I have to press shfit+F[5-8]+F10 for mute and so on.
What gives ?!?!
I too have found the apple keyboard fantastic to use, (On Win XP) and have downloaded the ‘compiled version’…..now, just how do I extract the files to ”Startup”..mind you, have discovered whilst typing this that the @ icon is not above the number 2 as shown on the keyboard, but by pressing shift and the button that has ” and ‘ on it. (second button to left of the enter key..) Do I extract and drag & drop it to the folder. I assume you are talking about the Startup folder in the main ”all programs” list.
Sussed it, and even used your link (cmd-windows plus S) to return to this part of your site. Now, as I use iTunes, how do I convert the winamp/yahoo keys to iTunes?. Mind you, I never used the keyboard I had before to operate such programmes so it is not that important. What was, is that I can now use print-screen. Many thanks to your download. Now I’m thinking of the apple wireless keyboard……….
[...] Apple also included additional function keys assigned ot the F1-12 keys. Since I’m using Windows XP, I had to get drivers or use third party software in order to get the media and volume keys working. I tried using the Bootcamp drivers, but for me, Windows didn’t like it. So, I had to resort to using a small piece of free software called AutoHotKey. Paired with the correct script, the media controls work great! You can find the script and additional details at Eric Savage’s blog. [...]
if using this on a laptop, will this effect my laptop built-in keys while having the apple keypad attached (or when not attached)
Thanks so much! Very much appreciated.
hi there, thanks for this! is there anyway to get the equals key on the right number keypad to work? And the brightness funtion?
Thanks, this is just what I’m looking for – no more plugging in my Dell keyboard just to get a screen capture.
THANK YOU!!!! I just surfed a bunch of garbage that was not helpful. Yours is the first I’ve found to fix this.
Great stuff – thank you! Running well with XP. Any experience with Windows 7?
Brilliant mate, this works a treat, even under Windows 7 Ultimate, thanks so much!!!!