MCPcopy Index your code
hub / github.com/dh1tw/streamdeck

github.com/dh1tw/streamdeck @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
56 symbols 142 edges 7 files 27 documented · 48%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

streamdeck

Go Report Card Go Reference MIT licensed

streamdeck buttons streamdeck slide show

streamdeck is a library for interfacing with the Elgato/Corsair Stream Deck

This library is written in the programing language Go.

Note

This project is a golang API for the Elgato/Corsair Stream Deck. This library unleashes the power of the StreamDeck. It allows you to completely customize the content of the device, without the need of the OEM's software.

License

streamdeck is published under the permissive MIT license.

Dependencies

There are a few go libraries which are needed at compile time. streamdeck does not have any runtime dependencies.

CGO

Compiling this library requires unfortunately a C compiler since the underlying HID library requires cgo for enumerating the HID devices.

Supported Operating Systems

The library should work on Linux, MacOS and Windows (>=7).

streamdeck works well on SoC boards like the Raspberry / Orange / Banana Pis.

Linux Device rules

On Linux you might have to create an udev rule, to access the streamdeck.

sudo vim /etc/udev/rules.d/99-streamdeck.rules

SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0060", MODE="0664", GROUP="plugdev"

After saving the udev rule, unplug and plug the streamdeck again into the USB port. For the rule above, your user must be a member of the plugdev group.

Make sure that your streamdeck is correctly recognized by executing:

$ go run examples/enumerate/enumerate.go
Found 1 Elgato Stream Deck(s):
    SerialNumber:        AL12H1A07123

Documentation

The auto generated documentation can be found at godoc.org

Examples

Please checkout the dedicated repository streamdeck-examples for examples.

My personal library of streamdeck elements / buttons can be found in the streamdeck-buttons repository.

Credits

This project would not have been possible without the work of Alex Van Camp. In particular his notes of the StreamDeck's protocol were very helpful. Alex has provided a reference implementation in Javascript / Node.js.

Extension points exported contracts — how you extend this code

BtnEvent (FuncType)
BtnEvent is a callback which gets executed when the state of a button changes, so whenever it gets pressed or released.
streamdeck.go

Core symbols most depended-on inside this repo

Update
called by 16
event.go
String
called by 12
event.go
fixKey
called by 6
config.go
PanelWidth
called by 5
config.go
Close
called by 4
streamdeck.go
FillImage
called by 4
streamdeck.go
debug
called by 3
streamdeck.go
checkValidKeyIndex
called by 3
streamdeck.go

Shape

Method 28
Function 20
Struct 6
FuncType 1
TypeAlias 1

Languages

Go100%

Modules by API surface

streamdeck.go28 symbols
event.go12 symbols
config.go6 symbols
event_test.go3 symbols
assets.go3 symbols
config_test.go2 symbols
cmd/demo/demo-cmd.go2 symbols

For agents

$ claude mcp add streamdeck \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact