Categories
Computers Music I Like Windows

The futile search for global hotkeys on iTunes for Windows

In the over three decades I’ve spent on this planet, relatively few of those years have I spent listening to music on a computer (desktop/laptop). Yes, in the old days, I listened to records. I think the first one was Def Leppard’s Pyromania. I spent a long time loving tapes, though, and making mix tapes for friends. Probably from 1991 to 1999 I made upwards of 600 mix tapes. I don’t know the actual number. A lot of care went into picking out the exact 20 to 24 songs to fit on those 90-minute cassette tapes. When CDs came along, I used those to copy to mix tapes. Eventually, I got into the whole CD-ripping business and keeping MP3 versions of songs on a computer. But when you don’t put in one CD at a time or one tape at a time, how do you make sense of all the thousands of songs you have?

Well, that’s when I started listening to music on the computer. My first program was WinAmp, and I loved it. I loved the little skins. I loved watching the playlists randomize. I loved the little windows you could move around. When the iPod came on the scene a few years ago, my wife and I each got one, and we realized that the way to get songs on the iPod was through iTunes. My first encounters with iTunes left me unimpressed. It didn’t seem an intuitive program to me. The funny thing is that now, years later, I can’t even remember what I found unintuitive about it. I just remember nothing made sense to me. Eventually, though, I grew to love iTunes. Even now I think it’s the best music management program out there (I say that knowing that Ubuntu users everywhere are groaning while looking for virtual rocks to virtually stone me with).

But when I moved over to Ubuntu three years ago, I had to give up iTunes. In the meantime, I’ve grown to love Rhythmbox. I had little trysts with AmaroK, JuK, XMMS, Exaile, Banshee, Quod Libet—you name the GUI Linux music program, and I’ve probably tried it. Still I kept going back to the simplicity of Rhythmbox.

Even though I still think iTunes is the best overall music management program (I know some people swear by Foobar2000, but that’s just a little too power user for me), there is one thing I miss from Linux music programs when I use iTunes on my Windows computer at work: global hotkeys.

Global hotkeys allows me to listen to music while using a variety of other programs (mainly Thunderbird and FileMaker Pro). No matter what program I’m using, if the phone rings or if someone walks in to talk to me, I can hit a key combination and pause whatever song I’m listening to. Or, even if no one is interrupting me, if I just want to switch to the next song, I don’t have to bring the focus back to iTunes to change songs.

Global hotkeys aren’t something iTunes natively supports, so I have to rely on helper programs to set them up for me. For a while I was using iTunesKeys. Not a bad program, except that it was buggy. It would take forever to quit if I wanted to quit iTunes. Sometimes it would just hang on a random song. Eventually I gave up on iTunesKeys and gave iTunes Global Hotkeys a whirl. Unfortunately, it appears to be a candidate for the admin rights hall of shame, since I get an error message about permissions when I try to run it as a limited user:

Well, since the error message appears every time I try to use any hotkey, since I don’t want to run as administrator all the time, since the author of iTunes Global Hotkeys is no longer maintaining the software, since iTunesKeys is buggy, since I still love iTunes for Windows, since there is no Windows port of Rhythmbox, and since I want to listen to music at work, I’m just going to keep that error message window open and move it down to the bottom of my screen.

In case anyone’s curious, here are the full error message details:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.UnauthorizedAccessException: Access to the path ‘c:\ITHKerrors.log’ is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamWriter.CreateFile(String path, Boolean append)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
at System.IO.StreamWriter..ctor(String path, Boolean append)
at iTunesHotKey.Form1.LogIt(String strInput, String strName)
at iTunesHotKey.Form1.nexttrack_HotKeyPressed(Object sender, EventArgs e)
at iTunesHotKey.GlobalHotKey.NotifyHotKey(IntPtr virtKey, IntPtr modifiers)
at iTunesHotKey.GlobalHotKey.HiddenForm.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
—————————————-
iTunesHotKey
Assembly Version: 1.2.0.0
Win32 Version: 1.2.0.0
CodeBase: file:///C:/Program%20Files/Jacob%20Hickman/iTunes%20Global%20Hotkeys/iTunesHotKey.exe
—————————————-
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
—————————————-
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
—————————————-
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
—————————————-
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
—————————————-
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
—————————————-
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
—————————————-
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
—————————————-
Interop.iTunesLib
Assembly Version: 1.8.0.0
Win32 Version: 1.8.0.0
CodeBase: file:///C:/Program%20Files/Jacob%20Hickman/iTunes%20Global%20Hotkeys/Interop.iTunesLib.DLL
—————————————-
CustomMarshalers
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/CustomMarshalers/2.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
—————————————-
zjmyotbn
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
—————————————-

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example: