Link the plugin to an application
Overview
You can link your Loupedeck plugin to an application so that the plugin is activated when the application comes to the foreground.
As an example, let's use the "DemoApplication" application that comes as a part of the Loupedeck Plugin SDK. Start it with this command line:
The full source code for this topic is at: DemoPlugin/Step05
You can find the DemoApplication
class here: DemoApplication.cs
Steps
-
Open the Demo plugin solution in Visual Studio.
-
In the Solution Explorer, double-click the DemoApplication.cs file.
-
Modify the
GetProcessName
method that returns the process name of the supported application: -
Start debugging and wait until the Loupedeck software is loaded.
-
Open the Loupedeck configuration UI.
-
Put the Dynamic mode switch on the top right corner of the configuration UI to ON.
-
Connect a Loupedeck console to your computer. The console shows the Windows profile on the screen. This is the default profile when no supported application is in the foreground.
-
Start the DemoApplication application from here:
-
The Loupedeck console shows the Demo profile on the screen.
-
Change the active applications with
Alt+Tab
to see how the Loupedeck console switches between them.
Notes
-
It is possible to define several process names for the supported applications. In this case, override the
GetProcessNames
method instead ofGetProcessName
: -
You can set a process name filter instead of fixed application names. In this case, override the
IsProcessNameSupported
method instead ofGetProcessName
: