SharpDeck 7.0.0-beta1
dotnet add package SharpDeck --version 7.0.0-beta1
NuGet\Install-Package SharpDeck -Version 7.0.0-beta1
<PackageReference Include="SharpDeck" Version="7.0.0-beta1" />
paket add SharpDeck --version 7.0.0-beta1
#r "nuget: SharpDeck, 7.0.0-beta1"
// Install SharpDeck as a Cake Addin #addin nuget:?package=SharpDeck&version=7.0.0-beta1&prerelease // Install SharpDeck as a Cake Tool #tool nuget:?package=SharpDeck&version=7.0.0-beta1&prerelease
SharpDeck
A comprehensive .NET wrapper for creating Stream Deck plugins, using the official Stream Deck SDK documentation. SharpDeck takes the hassle out of communicating with the Stream Deck SDK, and handles action caching and event delegation.
📦 Examples
- Counter - Single action counter plugin.
- Shared Counter - Multiple action plugin with a shared counter and reset.
✏️ Creating a plugin
SharpDeck enables console applications to easily communicate with Stream Deck; run dotnet new console
to create a .NET console application, and follow these five steps to create your first Stream Deck plugin.
🔗 1. Program.cs
public static void Main(string[] args)
{
#if DEBUG
System.Diagnostics.Debugger.Launch();
#endif
// Connect to Stream Deck.
SharpDeck.StreamDeckPlugin.Run();
}
⚡ 2. Create an action
using SharpDeck;
using SharpDeck.Events.Received;
[StreamDeckAction("com.geekyeggo.exampleplugin.firstaction")]
public class MyFirstAction : StreamDeckAction
{
// Methods can be overriden to intercept events received from the Stream Deck.
protected override Task OnKeyDown(ActionEventArgs<KeyPayload> args) => ...;
protected override Task OnKeyUp(ActionEventArgs<KeyPayload> args) => ...;
}
📄 3. Create a manifest.json file
For more information about creating a manifest file, please refer to the SDK documentation.
⚙️ 4. Configure .csproj
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>$(APPDATA)\Elgato\StreamDeck\Plugins\com.{{authorName}}.{{pluginName}}.sdPlugin\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<None Update="manifest.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<Exec Command="taskkill -f -t -im StreamDeck.exe -fi "status eq running"" />
</Target>
🚧 5. Debug profile
Located at Properties/launchSettings.json; this debug profile will automatically launch StreamDeck.exe when debugging starts.
{
"profiles": {
"DebugWin": {
"commandName": "Executable",
"executablePath": "c:\\windows\\system32\\cmd.exe",
"commandLineArgs": "/S /C \"start \"title\" /B \"%ProgramW6432%\\Elgato\\StreamDeck\\StreamDeck exe\" \""
}
}
}
🏃 Running
When debugging starts (default F5):
- The plugin will be built and installed.
- Stream Deck will then launch.
- You will be prompted to attach your plugin to a process; this allows for debugging.
When your plugin is ready, consider packaging and distributing it on the Stream Deck store.
📃 License
The MIT License (MIT) Stream Deck is a trademark or registered trademark of Elgato Systems.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.Configuration.Abstractions (>= 6.0.0)
- Microsoft.Extensions.DependencyInjection (>= 6.0.0)
- Microsoft.Extensions.Hosting (>= 6.0.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Logging (>= 6.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 6.0.0)
- Newtonsoft.Json (>= 13.0.1)
- NLog.Extensions.Logging (>= 1.7.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on SharpDeck:
Repository | Stars |
---|---|
nguyenquyhy/Flight-Tracker-StreamDeck
A Stream Deck plugin to interact with Microsoft Flight Simulation
|