Windows – How to make the play/pause keyboard button work correctly in iTunes 10 on Windows

itunesmedia-keyswindows 7

First and foremost, I have mmKeys installed correctly. My iTunes works almost perfect while minimized to the tray.

My problem is with the play/pause button on my Wireless Comfort Keyboard 5000. When iTunes does not have focus (like it's minimized, or if it isn't the application I'm active in, like right now while typing this) the play pause button toggles twice.

So, I'll push the pause button – and the song that is playing will pause, but a split second later will start up again. If the song is paused, and I push play, the song will immediately pause again. In order to get the key to work correctly, I must give iTunes focus, and then push the button.

Here's a video I created on youtube: http://www.youtube.com/watch?v=POh6Gbm5QZI

OS: Windows 7 x64
iTunes: 10.0.0.68
Intellitype: 8.0

Edit: Apparently I have intellitype 8.0 instead of 7.1

Best Answer

It appears the implementation of play/pause may be bugged - or simply changed in iTunes 10 / IntelliType 8.0. I downloaded and installed the following:

http://maximized.com/freeware/scriptsforitunes/default.asp

It is a series of VBS scripts that are run with iTunes. I make no warrantee or guarantee as to their safety. Firstly, I removed mmKeys.dll, and then edited PlayPause.vbs. For case 0 and 1, instead of running iTunes.PlayPause, it works if I use iTunes.Play and iTunes.Pause respectively. I then mapped this VBS file to my play pause button. And bam! It works!

' Do the appropriate thing
select case CurState
    case 0
        ' Stopped
        iTunes.Play
    case 1
        ' Playing
        iTunes.Pause
    case 2
        ' Fast-forwarding
        iTunes.Resume
    case 3
        ' Rewinding
        iTunes.Resume
end select
Related Question