How can I map keyboard keys to other keyboard keys in an app specific manner?
@iGameRam's suggestion of KeyRemap4MacBook ended up working for me. I selected KeyRemap4MacBook because I am already using it to remap keys for me system wide. To do this I had to read the reference manual.

From the reference manual I found that there is a private.xml file that enables me to add more remapping values to KeyRemap4MacBook. By going to the KeyRemap4MacBook pref pane, going to the "Misc &amp; Uninstall" tab and selecting "Open private.xml" I was able to open the file.

I had to add two elements to my private.xml. The first was:

&lt;appdef&gt;
  &lt;appname&gt;SPOTIFY&lt;/appname&gt;
  &lt;equal&gt;com.spotify.client&lt;/equal&gt;
&lt;/appdef&gt;


This is because KeyRemap4MacBook does not ship with an app definition for Spotify. It does ship with many others. I need the app definition so my keyboard keybindings only apply for Spotify and are not system wide.

The second element I added was:

&lt;item&gt;
  &lt;name&gt;Spotify Vim Style Nav&lt;/name&gt;
  &lt;appendix&gt;J and K works in Spotify&lt;/appendix&gt;
  &lt;identifier&gt;private.spotify.vim_style_nav&lt;/identifier&gt;
  &lt;only&gt;SPOTIFY&lt;/only&gt;
  &lt;autogen&gt;--KeyToKey-- KeyCode::J, KeyCode::CURSOR_DOWN&lt;/autogen&gt;
  &lt;autogen&gt;--KeyToKey-- KeyCode::K, KeyCode::CURSOR_UP&lt;/autogen&gt;
&lt;/item&gt;


This is the actual definition of the key bindings. The &lt;identifier&gt; tag is supposed to be unique for every key mapping. The manual suggests prefixing the identifier with private.. The &lt;only&gt; tag has to match an appname defined in the private.xml or shipped with KeyRemap4MacBook.

The &lt;autogen&gt; tags are supposed to contain the mappings. The manual has many examples on what kind of mappings that can be created. The two I have map the J and K keys to the Down and Up keys respectively.

Once the file has been saved, I just needed to press the "ReloadXML" button and then my mapping appeared as an option in the menu.

After selecting it everything worked as I wanted.