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

One thought on “Configuring Contour ShuttleXpress for Media Controls

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s