Deep linking

According to the Stream Deck SDK documentation: "Deep-linking is the process of sending messages to local apps via custom URL scheme registered on the user's device, for example, a computer or mobile phone."

In simple terms, this means you can use anything that can access a URL to send messages to the Midi plugin. There are several ways to achieve this; please refer to the suggestions below.

Deep link syntax

Deep links have the following syntax:

streamdeck://plugins/message/se.trevligaspel.midi/hello?world#again
                                                 └─┬──┘ └─┬─┘ └─┬─┘
	                                            part1 part2  part3

part1, 2 and 3 keep the information that will reach the script.

  • part1 must be prefixed with the "/" character.
  • part2 must be prefixed with the "?" character.
  • part3 must be prefixed with the "#" character.

All parts are optional, it is perfectly fine, e.g., to have a URL with only part2 present.

The content of each part is entirely up to you, as is how you choose to use it in the script. One suggestion is to use part1 as a target denominator in the script if you have multiple scripts that need to respond to different messages.

Receiving deep links

Deep links are received with the (deeplink) event:

(deeplink:_part1_ , _part2_ , _part3_) 

_part1_, _part2_ and _part3_ will, of course, map to the corresponding part in the sent message (not including the prefix characters).

Please see the (deeplink) event for more details.

Please note: (deeplink) commands are always available to scripts in the buttons and dials that handle scripts. Due to technical limitations, (deeplink) commands are available to background scripts only if there is at least one Midi plugin button or dial loaded in an active profile and page on any device. If there are absolutely no Midi plugin actions loaded anywhere, background scripts will not be able to receive deep links.

Sending deep links

As mentioned, you can send deep links in many ways, including but not limited to the following suggestions. Deep link messages can only be initiated from the same computer, not from other computers.

Using a browser

With a browser, you can enter the URL in the address field.

Using a command

In a Command/Terminal window, you can enter a command to send the URL. The syntax differs a bit depending on if you are using Windows or macOS.

In Windows:

start "" "streamdeck://plugins/message/se.trevligaspel.midi/hello?world#again"

The double "" between the start command and the URL is mandatory.

In macOS:

open "streamdeck://plugins/message/se.trevligaspel.midi/hello?world#again"

Using a preconfigured web page

For use with the Midi plugin, a web page is designed to send deep links to the plugin. This web page can be opened manually or by using the {input:...} action in a script.

If opened manually, the page will allow input of values to all three parts of the deep link message and looks like this:

URL: https://trevligaspel.se/streamdeck/midi/SendDeepLink.html


If opened by an {input:...} action, the page adapts to the parameters given in the {input:...} action. Syntax:

{input:_id_ , _part2Label_ , _part3Label_}

  • _id_ is returned as part1 in the deeplink. This can be utilized in the deeplink event to establish a one-to-one relationship between the input action and the deeplink event. This parameter is not displayed on the web page; the _id_ parameter is merely returned as part1 in the deeplink message.
  • _part2Label_ and _part3Label_ are the labels that should be shown for the input fields of part2 and part3 in the returned deeplink message. If you only require an input field for part2, the _part3Label_ parameter should be omitted. If, for any reason, you only need an input field for part3, the _part2Label_ parameter must be set to "".

Example:

[(press){input:Volume,Min volume,Max volume}]
[(deeplink:Volume,*,*){text:#@e_deeplinkpart2#\n#@e_deeplinkpart3#}]

When you press the button/dial, this web page will be displayed in a browser:

Please see the {input:...} action for more details.