Plugin
Stream Deck provides an API for distributing plugins as native console apps, for example those written in C++, C#, etc, with communication being handled by a dedicated WebSocket connection.
Creating native plugins is an advanced technique, and is not recommended. Instead, consider using the Stream Deck SDK with Node.js native addons.
Registration
In order to establish a connection with Stream Deck, your plugin must first register itself using a unique identifier. The information required to establish the connection is provided as a command line parameter, along with:
| Parameter | Description |
|---|---|
-port | The port the WebSocket is running on. |
-info | A serialized JSON string that contains information about Stream Deck, Stream Deck devices, and your plugin. See RegistrationInfo. |
-pluginUUID | Your plugin's unique registration identifier. |
‑registerEvent | Name of the registration event. |
Upon startup, your plugin must connect to the WebSocket on the specified -port, and send a registration message as a JSON serialized string in the following format:
type RegisterEvent = {
event: string; // -registerEvent parameter
uuid: string; // -pluginUUID parameter
};RegistrationInfo
Information about the Stream Deck application, the plugin, the user's operating system, user's Stream Deck devices, etc.
type RegistrationInfo = {
application: {
font: string;
language: "de" | "en" | "es" | "fr" | "ja" | "ko" | "zh_CN" | "zh_TW";
platform: "mac" | "windows";
platformVersion: string;
version: string;
};
colors: {
buttonMouseOverBackgroundColor: string;
buttonPressedBackgroundColor: string;
buttonPressedBorderColor: string;
buttonPressedTextColor: string;
highlightColor: string;
};
devicePixelRatio: number;
devices: {
id: string;
name: string;
size: {
columns: number;
rows: number;
};
type: DeviceType;
}[];
plugin: {
uuid: string;
version: string;
};
};application: objectRequired
Stream Deck application specific information.
font: Required
string Font being used by the Stream Deck application.
language: Required
"de" | "en" | "es" | "fr" | "ja" | "ko" | "zh_CN" | "zh_TW" Users preferred language; this is used by the Stream Deck application for localization.
platform: Required
"mac" | "windows" Operating system.
platformVersion: Required
string Operating system version, e.g. "10" for Windows 10.
version: Required
string Stream Deck application version.
colors: objectRequired
Collection of preferred colors used by the Stream Deck.
buttonMouseOverBackgroundColor: Required
string Color that denotes the background of a button that is being moused over.
buttonPressedBackgroundColor: Required
string Color that denotes the background of a pressed button.
buttonPressedBorderColor: Required
string Color that denotes the border of a press button.
buttonPressedTextColor: Required
string Color that denotes the text of a pressed button.
highlightColor: Required
string Color of highlighted text.
devicePixelRatio: Required
number Pixel ratio, used to identify if the Stream Deck application is running on a high DPI screen.
devices: Required
object[]
Devices associated with the Stream Deck application; this may include devices that are not currently connected. Use
"deviceDidConnect" event to determine which devices are active.
plugin: objectRequired
Information about the plugin.
uuid: Required
string Unique identifier of the plugin, as defined by the plugin.
version: Required
string Version of the plugin.
Events
Plugins can receive the following events from Stream Deck via their WebSocket connection.
The context of an action is not guaranteed to persist across app cycles and therefore should not be used as a
long-term identifier externally.
ApplicationDidLaunch
Occurs when a monitored application is launched. Monitored applications can be defined in the manifest.json file via the Manifest.ApplicationsToMonitor property. See also
ApplicationDidTerminate.
type ApplicationDidLaunch = {
event: "applicationDidLaunch";
payload: {
application: string;
};
};event: Required
"applicationDidLaunch" Name of the event used to identify what occurred.
payload: objectRequired
Payload containing information about the application that triggered the event.
application: Required
string Name of the application that triggered the event.
ApplicationDidTerminate
Occurs when a monitored application terminates. Monitored applications can be defined in the manifest.json file via the Manifest.ApplicationsToMonitor property. See also
ApplicationDidLaunch.
type ApplicationDidTerminate = {
event: "applicationDidTerminate";
payload: {
application: string;
};
};event: Required
"applicationDidTerminate" Name of the event used to identify what occurred.
payload: objectRequired
Payload containing information about the application that triggered the event.
application: Required
string Name of the application that triggered the event.
DeviceDidChange
Occurs when a Stream Deck device changed, for example its name or size.
Available from Stream Deck 7.0.
type DeviceDidChange = {
device: string;
deviceInfo: {
name: string;
size: {
columns: number;
rows: number;
};
type: DeviceType;
};
event: "deviceDidChange";
};device: Required
string Unique identifier of the Stream Deck device that this event is associated with.
deviceInfo: DeviceInfoRequired
Information about the device that changed.
name: Required
string Name of the device, as specified by the user in the Stream Deck application.
size: SizeRequired
Number of action slots, excluding dials / touchscreens, available to the device.
columns: Required
number Number of columns available on the Stream Deck device.
rows: Required
number Number of rows available on the Stream Deck device.
type: Required
DeviceType
Type of the device that was connected, e.g. Stream Deck +, Stream Deck Pedal, etc. See DeviceType.
event: Required
"deviceDidChange" Name of the event used to identify what occurred.
DeviceDidConnect
Occurs when a Stream Deck device is connected. See also DeviceDidDisconnect.
type DeviceDidConnect = {
device: string;
deviceInfo: {
name: string;
size: {
columns: number;
rows: number;
};
type: DeviceType;
};
event: "deviceDidConnect";
};device: Required
string Unique identifier of the Stream Deck device that this event is associated with.
deviceInfo: DeviceInfoRequired
Information about the newly connected device.
name: Required
string Name of the device, as specified by the user in the Stream Deck application.
size: SizeRequired
Number of action slots, excluding dials / touchscreens, available to the device.
columns: Required
number Number of columns available on the Stream Deck device.
rows: Required
number Number of rows available on the Stream Deck device.
type: Required
DeviceType
Type of the device that was connected, e.g. Stream Deck +, Stream Deck Pedal, etc. See DeviceType.
event: Required
"deviceDidConnect" Name of the event used to identify what occurred.
DeviceDidDisconnect
Occurs when a Stream Deck device is disconnected. See also DeviceDidConnect.
type DeviceDidDisconnect = {
device: string;
event: "deviceDidDisconnect";
};device: Required
string Unique identifier of the Stream Deck device that this event is associated with.
event: Required
"deviceDidDisconnect" Name of the event used to identify what occurred.
DialDown
Occurs when the user presses a dial (Stream Deck +). See also DialUp.
NB: For other action types see KeyDown.
type DialDown = {
action: string;
context: string;
device: string;
event: "dialDown";
payload: {
controller: "Encoder";
coordinates: {
column: number;
row: number;
};
resources: {
[key: string]: string;
};
settings: JsonObject;
};
};action: Required
string
Unique identifier of the action as defined within the plugin's manifest (Actions[].UUID) e.g.
"com.elgato.wavelink.mute".
context: Required
string Identifies the instance of an action that caused the event, i.e. the specific key or dial. This identifier can be used to provide feedback to the Stream Deck, persist and request settings associated with the action instance, etc.
device: Required
string Unique identifier of the Stream Deck device that this event is associated with.
event: Required
"dialDown" Name of the event used to identify what occurred.
payload: TPayloadRequired
Contextualized information for this event.
controller: Required
"Encoder" Defines the controller type the action is applicable to. Keypad refers to a standard action on a Stream Deck device, e.g. 1 of the 15 buttons on the Stream Deck MK.2, or a pedal on the Stream Deck Pedal, etc., whereas an Encoder refers to a dial / touchscreen on the Stream Deck +.
coordinates: CoordinatesRequired
Coordinates that identify the location of the action.
column: Required
number Column the action instance is located in, indexed from 0.
row: numberRequired
Row the action instance is located on, indexed from 0.
Note: When the device is Stream Deck +, the row can be 0 for keys (Keypad), and will always
be 0 for dials (Encoder); to differentiate between actions types, cross-check the controller.
resources: ResourcesRequired
Resources (files) associated with the action.
Available from Stream Deck 7.1.
settings: Required
JsonObject Settings associated with the action instance.
DialRotate
Occurs when the user rotates a dial (Stream Deck +).
type DialRotate = {
action: string;
context: string;
device: string;
event: "dialRotate";
payload: {
controller: "Encoder";
coordinates: {
column: number;
row: number;
};
pressed: boolean;
resources: {
[key: string]: string;
};
settings: JsonObject;
ticks: number;
};
};action: Required
string
Unique identifier of the action as defined within the plugin's manifest (Actions[].UUID) e.g.
"com.elgato.wavelink.mute".
context: Required
string Identifies the instance of an action that caused the event, i.e. the specific key or dial. This identifier can be used to provide feedback to the Stream Deck, persist and request settings associated with the action instance, etc.
device: Required
string Unique identifier of the Stream Deck device that this event is associated with.
event: Required
"dialRotate" Name of the event used to identify what occurred.
payload: TPayloadRequired
Contextualized information for this event.
controller: Required
"Encoder" Defines the controller type the action is applicable to. Keypad refers to a standard action on a Stream Deck device, e.g. 1 of the 15 buttons on the Stream Deck MK.2, or a pedal on the Stream Deck Pedal, etc., whereas an Encoder refers to a dial / touchscreen on the Stream Deck +.
coordinates: CoordinatesRequired
Coordinates that identify the location of the action.
column: Required
number Column the action instance is located in, indexed from 0.
row: numberRequired
Row the action instance is located on, indexed from 0.
Note: When the device is Stream Deck +, the row can be 0 for keys (Keypad), and will always
be 0 for dials (Encoder); to differentiate between actions types, cross-check the controller.
pressed: Required
boolean Determines whether the dial was pressed whilst the rotation occurred.
resources: ResourcesRequired
Resources (files) associated with the action.
Available from Stream Deck 7.1.
settings: Required
JsonObject Settings associated with the action instance.
ticks: Required
number Number of ticks the dial was rotated; this can be a positive (clockwise) or negative (counter-clockwise) number.
DialUp
Occurs when the user releases a pressed dial (Stream Deck +). See also DialDown.
NB: For other action types see KeyUp.
type DialUp = {
action: string;
context: string;
device: string;
event: "dialUp";
payload: {
controller: "Encoder";
coordinates: {
column: number;
row: number;
};
resources: {
[key: string]: string;
};
settings: JsonObject;
};
};action: Required
string
Unique identifier of the action as defined within the plugin's manifest (Actions[].UUID) e.g.
"com.elgato.wavelink.mute".
context: Required
string Identifies the instance of an action that caused the event, i.e. the specific key or dial. This identifier can be used to provide feedback to the Stream Deck, persist and request settings associated with the action instance, etc.
device: Required
string Unique identifier of the Stream Deck device that this event is associated with.
event: Required
"dialUp" Name of the event used to identify what occurred.
payload: TPayloadRequired
Contextualized information for this event.
controller: Required
"Encoder" Defines the controller type the action is applicable to. Keypad refers to a standard action on a Stream Deck device, e.g. 1 of the 15 buttons on the Stream Deck MK.2, or a pedal on the Stream Deck Pedal, etc., whereas an Encoder refers to a dial / touchscreen on the Stream Deck +.
coordinates: CoordinatesRequired
Coordinates that identify the location of the action.
column: Required
number Column the action instance is located in, indexed from 0.
row: numberRequired
Row the action instance is located on, indexed from 0.
Note: When the device is Stream Deck +, the row can be 0 for keys (Keypad), and will always
be 0 for dials (Encoder); to differentiate between actions types, cross-check the controller.
resources: ResourcesRequired
Resources (files) associated with the action.
Available from Stream Deck 7.1.
settings: Required
JsonObject Settings associated with the action instance.
DidReceiveDeepLink
Occurs when Stream Deck receives a deep-link message intended for the plugin. The message is re-routed to the plugin, and provided as part of the payload. One-way deep-link message
can be routed to the plugin using the URL format streamdeck://plugins/message/<PLUGIN_UUID>/{MESSAGE}.
type DidReceiveDeepLink = {
event: "didReceiveDeepLink";
payload: {
url: string;
};
};event: Required
"didReceiveDeepLink" Name of the event used to identify what occurred.
payload: objectRequired
Payload containing information about the URL that triggered the event.
url: Required
string The deep-link URL, with the prefix omitted.