Documentation
¶
Overview ¶
Package streamdeck controls Elgato Stream Deck devices.
Index ¶
- Constants
- type Device
- func (d Device) Asleep() bool
- func (d Device) Clear() error
- func (d *Device) Close() error
- func (d *Device) Fade(start uint8, end uint8, duration time.Duration) error
- func (d Device) FirmwareVersion() (string, error)
- func (d *Device) Open() error
- func (d *Device) ReadInput() (chan Event, error)
- func (d *Device) ReadKeys() (chan Key, error)
- func (d Device) Reset() error
- func (d Device) ScreenSegmentWidth() uint
- func (d *Device) SetBrightness(percent uint8) error
- func (d Device) SetDialKnobColor(index uint8, c color.Color) error
- func (d Device) SetDialRingColor(index uint8, c color.Color) error
- func (d Device) SetDialRingPercentage(index uint8, c color.Color, percent uint8) error
- func (d Device) SetImage(index uint8, img image.Image) error
- func (d Device) SetInfoScreenImage(img image.Image) error
- func (d Device) SetKeyColor(index uint8, c color.Color) error
- func (d Device) SetScreenImage(x, y int, img image.Image) error
- func (d Device) SetScreenSegmentImage(index uint8, img image.Image) error
- func (d *Device) SetSleepFadeDuration(t time.Duration)
- func (d *Device) SetSleepTimeout(t time.Duration)
- func (d *Device) Sleep() error
- func (d *Device) Wake() error
- type DialPress
- type DialTurn
- type Event
- type Key
- type Touch
- type TouchType
Constants ¶
const ( VID_ELGATO = 0x0fd9 PID_STREAMDECK = 0x0060 PID_STREAMDECK_V2 = 0x006d PID_STREAMDECK_MK2 = 0x0080 PID_STREAMDECK_MK2_SCISSOR = 0x00a5 PID_STREAMDECK_MK2_MODULE = 0x00b9 PID_STREAMDECK_MK2_MODULE_SCISSOR = 0x00e4 PID_STREAMDECK_MINI = 0x0063 PID_STREAMDECK_MINI_MK2 = 0x0090 PID_STREAMDECK_MINI_DISCORD = 0x00b3 PID_STREAMDECK_MINI_MK2_MODULE = 0x00b8 PID_STREAMDECK_XL = 0x006c PID_STREAMDECK_XL_V2 = 0x008f PID_STREAMDECK_XL_V2_MODULE = 0x00ba PID_STREAMDECK_NEO = 0x009a PID_STREAMDECK_PEDAL = 0x0086 PID_STREAMDECK_PLUS = 0x0084 PID_STREAMDECK_PLUS_XL = 0x00c6 PID_STREAMDECK_STUDIO = 0x00aa )
Stream Deck Vendor & Product IDs.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
ID string
Serial string
Columns uint8
Rows uint8
Keys uint8
// KeyWidth and KeyHeight are the pixel dimensions of a key's display.
// Both are zero if the keys have no displays (Stream Deck Pedal).
KeyWidth uint
KeyHeight uint
// Pixels is the smaller of KeyWidth and KeyHeight. It equals both on
// devices with square keys, which are all but the Stream Deck Studio.
Pixels uint
DPI uint
Padding uint
// TouchKeys is the number of touch keys without a display (Stream Deck
// Neo). They report as keys Keys to Keys+TouchKeys-1 and have an RGB
// LED, set with SetKeyColor.
TouchKeys uint8
// Dials is the number of rotary dials (Stream Deck+, + XL and Studio).
Dials uint8
// DialRings is true if the dials have RGB LED rings and knob LEDs, set
// with SetDialRingColor, SetDialRingPercentage and SetDialKnobColor
// (Stream Deck Studio).
DialRings bool
// ScreenWidth and ScreenHeight are the pixel dimensions of the touch
// screen strip (Stream Deck+ and + XL), which is split into
// ScreenSegments equally sized segments, one above each dial. All zero
// if the device has no touch screen.
ScreenWidth uint
ScreenHeight uint
ScreenDPI uint
ScreenSegments uint8
// InfoScreenWidth and InfoScreenHeight are the pixel dimensions of the
// info screen (Stream Deck Neo), set with SetInfoScreenImage. Both are
// zero if the device has no info screen.
InfoScreenWidth uint
InfoScreenHeight uint
// contains filtered or unexported fields
}
Device represents a single Stream Deck device.
func (Device) Clear ¶
Clear clears the Stream Deck, setting a black image on all buttons, the touch screen and the info screen.
func (Device) FirmwareVersion ¶
FirmwareVersion returns the firmware version of the device.
func (*Device) Open ¶
Open the device for input/output. This must be called before trying to communicate with the device.
func (*Device) ReadInput ¶ added in v0.6.0
ReadInput returns a channel, which it will use to emit all input events: Key, DialPress, DialTurn and Touch. The channel gets closed when reading from the device fails.
func (*Device) ReadKeys ¶
ReadKeys returns a channel, which it will use to emit key presses/releases. Dial and touch screen input is ignored; use ReadInput to receive it.
func (Device) Reset ¶
Reset resets the Stream Deck, clears all button images and shows the standby image.
func (Device) ScreenSegmentWidth ¶ added in v0.6.0
ScreenSegmentWidth returns the width of a touch screen segment in pixels, or 0 if the device has no touch screen.
func (*Device) SetBrightness ¶
SetBrightness sets the background lighting brightness from 0 to 100 percent.
func (Device) SetDialKnobColor ¶ added in v0.7.0
SetDialKnobColor sets the color of a dial's knob LED (Stream Deck Studio).
func (Device) SetDialRingColor ¶ added in v0.7.0
SetDialRingColor sets all LEDs of a dial's ring to a color (Stream Deck Studio).
func (Device) SetDialRingPercentage ¶ added in v0.7.0
SetDialRingPercentage lights the given percentage of a dial's ring LEDs in a color and turns the others off, e.g. to show a volume level (Stream Deck Studio).
func (Device) SetImage ¶
SetImage sets the image of a button on the Stream Deck. The provided image needs to be in the correct resolution for the device. The index starts with 0 being the top-left button. On a device without key displays it does nothing.
func (Device) SetInfoScreenImage ¶ added in v0.7.0
SetInfoScreenImage sets the image of the info screen (Stream Deck Neo). The image needs to be of the info screen's size.
func (Device) SetKeyColor ¶ added in v0.7.0
SetKeyColor sets the color of a touch key's LED (Stream Deck Neo). Touch keys have the indexes Keys to Keys+TouchKeys-1.
func (Device) SetScreenImage ¶ added in v0.6.0
SetScreenImage sets the image of a region of the touch screen, with its top-left corner at x, y. The image must fit within the screen.
func (Device) SetScreenSegmentImage ¶ added in v0.6.0
SetScreenSegmentImage sets the image of a touch screen segment. The image needs to be of the segment's size. The index starts with 0 being the leftmost segment.
func (*Device) SetSleepFadeDuration ¶
SetSleepFadeDuration sets the duration of the fading animation when the device is put to sleep or wakes up.
func (*Device) SetSleepTimeout ¶
SetSleepTimeout sets the time after which the device will sleep if no key events are received.
type DialTurn ¶ added in v0.6.0
DialTurn is emitted when a dial gets turned. Steps is positive for clockwise and negative for counterclockwise turns.
type Event ¶ added in v0.6.0
type Event interface {
// contains filtered or unexported methods
}
Event is an input event read from the device: Key, DialPress, DialTurn or Touch.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
streamdeck-cli
command
Command streamdeck-cli controls Elgato Stream Deck devices from the command line.
|
Command streamdeck-cli controls Elgato Stream Deck devices from the command line. |