Configuring Contour ShuttleXpress for Media Controls

TL;DR

This article describes the configuration I use for my Contour ShuttleXpress to control media player software. Feel free to skip directly to the configuration steps (Putting It All Together).

Background

I need to control media player software – playing, pausing, and controlling volume – on a PC while the monitors, keyboard, and mouse are switched to a different PC. (I happen to use Microsoft Groove, the deafult media player for Windows 10, but this solution should work with the media player software of your choice.) The Contour ShuttleXpress is a great hardware solution for this problem. You can read more about my reasons for selecting the ShuttleXpress over other possible solutions.

I was unable to find a one-stop solution, but I was able to create a relatively simple approach using the steps defined below.

My solution requires two software components:

  1. ShuttleXpress configuration software
  2. A scripting tool, like AutoHotkey

Application-specific vs. Global Settings

The ShuttleXpress control software comes with several dozen profiles for popular software, including video editing, productivity, and media applications.

Whenever an application with a configured profile is active, the controls switch to the configured behavior for that application. When an application with no configured profile is active, the ShuttleXpress applies the Global Settings profile.

I don’t currently use any of the applications where a controller like ShuttleXpress can really shine (i.e. audio or video editing tools). Additionally, the majority of the time I use ShuttleXpress will be while the monitors are switched to a different PC – I will have no way to see what application is currently active.

For my purposes, I have deleted all Application-specific settings and plan to use ONLY the Global Settings. For what it’s worth, the configuration software includes an option to restore the default settings if I ever decide to use the ShuttleXpress for other purposes.

Configuration Options

Each of the ShuttleXpress buttons can be assigned to any of the following types of Computer responses:

  • Do nothing
  • Press Modifiers (like Alt, Control, Shift, or Windows Key on a PC)
  • Type Keystroke
  • Mouse Click
  • Mouse Wheel

I looked into the Type Keystroke  which includes all of the standard keys as well as some special keys. The special keys include some media commands (Play, Pause, Volume Up, Volume Down, etc.).

These options seem like they should work, and some do (i.e. Volume Up/Down). But the critical commands for my purposes (Play, Pause, Next, Previous) do not seem to work, even when the media player is selected. Perhaps I’m not doing something correctly or perhaps they only work with a specific type of media player software. Who knows?

Regardless, there are always other ways to make things work.

Creating Global Media Control Shortcuts

Unfortunately, the built-in ShuttleXpress software does not seem to send the correct media commands. So I needed to find a different method to send the commands and I need it to always be active.

A quick search took me to a post on StackExchange that offered a simple solution to this problem: AutoHotkey. Using a simple AutoHotkey script, I was able to establish global shortcuts that mimic the desired media commands.

The script defines the expected keystrokes using AutoHotkey’s hot key list, and remaps the keystrokes to a media key function. It’s basically defined like this:

SourceKeys :: Action

For example, I want the keystroke combination of Ctrl + Alt + Down Arrow to send the Play/Pause media command, so the AutoHotkey mapping command would be this:

^!Down::Send {Media_Play_Pause}

Now, I can configure ShuttleXpress to type the specified keystrokes and AutoHotkey will perform the desired media commands.  Yes!

Putting It All Together

Here are the steps I used to achieve my solution:

  1. Prerequisites:
    1. I’m using Windows 10, but most of the options here are likely to work on other versions of Windows or on a Mac. YMMV
    2. In case this was not obvious, you’ll need a ShuttleXpress (or Shuttle Pro)
    3. Install the ShuttleXpress configuration software (currently version 2.13.3)
    4. Install AutoHotkey (currently version 1.1.30)
  2. Create a new text file called MediaKeyMappings.ahk (or whatever you would like to call it) with the following contents:
    #Ctrl + Alt + Left: Previous
    ^!Left::Send {Media_Prev}
    
    #Ctrl + Alt + Right: Next 
    ^!Right::Send {Media_Next} 
    
    #Ctrl + Alt + Down: Play/Pause 
    ^!Down::Send {Media_Play_Pause} 
    
    #Ctrl + Alt + Shift + Down: Mute 
    +^!Down::Send {Volume_Mute}
  3. Set the MediaKeyMappings script to launch at startup. Paraphrased from the AutoHotkey FAQ:
    1. Using Windows Explorer, locate the script file you created above. Copy the file using Ctrl + C.
    2. Open the Startup folder by running shell:startup.
    3. Paste a shortcut to the copied file inside the Startup folder by right-clicking and selecting Paste Shortcut.
  4. Configure the key functionality in the ShuttleXpress configuration software
    1. Select the desired User action (in this case, Button 1).ContourShuttleXpress_2
    2. Select the Computer response (in this case, Type Keystroke).ContourShuttleXpress_3
    3. Click inside the Keystroke text box and press the key combination corresponding to the desired action (in this case Ctrl + Alt + Down Arrow for Play/Pause).ContourShuttleXpress_1
    4. For good measure, you will want to type the name of the command in the Comment text box (this this case Play/Pause). This will make it easier to identify later.
    5. Repeat sub-steps 1-4 for each of the desired keystrokes (Next, Previous, and Mute) and choose your preferred buttons for the command. For reference, here are the commands I have mapped to the primary buttons:ContourShuttleXpress_5
      *I’ll write a separate post in the near future about the SwitchMonitor command…
  5. I have also mapped the Jog Wheel (the inner wheel that spins freely in both directions) to control my system’s volume. I was able to accomplish this using only the ShuttleXpress software (no intervention needed for AutoHotkey):
    1. User action: Jog Left (and then Jog Right)
    2. Computer response: Type Keystroke
    3. Keystroke: Volume Down / Volume Up (found in the Special Keys menu)ContourShuttleXpress_6png.png
  6. Be sure to export your ShuttleXpress settings (Options | Export settings). There is no way to revert to a previous configuration if you happen to apply a change that doesn’t work as desired. Having a backup that you can restore will really save your bacon if this happens (it has already happened to me several times)!

Now that I have this solution in place, I have been able to quickly and consistently control media software. This allows me to enjoy music while I work, which really makes my productivity blossom!

Day Lillies 1

6 thoughts on “Configuring Contour ShuttleXpress for Media Controls

  1. Thanks for this. I have run into the same problem. As much as I like the ShuttleXpress hardware, the software is truly horrible.

    I took a similar approach however I am targeting a specific media player app (JRiver’s Media Center). I have configured the shuttle to use JRiver’s already mapped media keys (eg. CTRL + Num 2 = play/pause). In general this works as one would expect.

    The problem I now face is that some apps eat the shuttle’s resulting keystrokes. The shuttle seems to be sending the keystrokes to whatever app has focus regardless if using the “Global Settings”. This leaves it up to the app whether it eats the keystrokes or passes them on to the system. [SMH]

    My main goal was to quickly manage music playlists while I am coding in a remote desktop session. But, alas, the keystrokes are passed to the remote desktop. [again, SMH]

    Their bigger v2 device unlocks the use of macros (press a button and a series of commands are executed). This would solve my problem but they do not enable it for the Xpress device. [final SMH]

    I want to like this tool but it has been a painful journey and I am pretty confident that I won’t purchase Contour’s devices in the future. Once burned, twice shy.

    Liked by 1 person

    1. Hi Dave,
      Thanks for your comment. I think the reason that the ShuttleXpress works well for me is that I *don’t* use it for anything except media controls. I’ve deleted literally all other application settings except for “Global Settings”.

      Not sure if there’s any workaround for the current hardware/software that will allow it to always send the specific commands regardless of the application that’s selected.

      Please let me know if you’re able to delete the unused Application Profiles and if that solves the problem.

      -Mark

      Like

  2. I have tried removing all but the global settings. Same problem.

    Edge browser passes the keystrokes to the system properly even if the focus is on a web page text entry control.But Notepad, Notepad++, command line window and others do not. This is true even for non key commands like volume up, mute and other system commands.

    Random list of apps that function correctly:
    * Edge Browser
    * Outlook (even if I am editing an email message)
    * Explorer
    * Adobe Acrobat
    * Adobe Photoshop (even if editing text)

    I would rather not write my own software to manage this.

    Thanks for your help.

    Liked by 1 person

  3. If I understand correctly, it sounds like your media software (JRiver – https://www.jriver.com/) generally accepts the keystrokes, even when it’s not the currently-selected application. But sometimes other applications intercept the keystrokes – that makes sense.

    I think the reason my solution works is that AutoHotKey manages to capture all keystrokes for the system and respond to them ahead of other applications.

    As someone who writes software for a living I sometimes forget how problems like this can be tricky when using a custom solution isn’t something that you want to tackle. (Not judging at all – that’s a completely valid position.)

    Sorry ShuttleXpress didn’t work in your scenario – I’ve been very happy with it for almost a year.

    -mark

    Like

Leave a comment