Skip to content

Conversation

@FlowingSPDG
Copy link

Hello. I made a Stream Deck Module series implemention based on official document.
Still WIP but I'll make it done quick(I think)

@FlowingSPDG
Copy link
Author

FlowingSPDG commented Sep 15, 2025

Main commands are now implemented.

There are some missing commands that original did not have:

  • 6 Keys
    • Get Firmware version(with options) - docs
    • Show Logo - docs
    • Set Idle Time Before Sleep Mode - docs
    • Update Boot Logo - docs
    • Get Idle time before entering Sleep Mode - docs
  • 15/32 Keys
    • Get Firmware version(with options) - docs
    • Update Full Screen Image - docs (Basically same as Update Key Image, but different command id
    • Update Boot Logo - docs (same as above)
    • Update Background - docs (same as above)
    • Show Logo - docs (same as above)
    • Fill LCD with Color - docs (Implemented Fill Key with Color as set-rgb)
    • Set Idle time before entering Sleep Mode - docs
    • Get Idle time before entering Sleep Mode - docs
    • Get Unit Information - docs

I guess we can ignore these commands for now, or maybe implement them using different struct that implements StreamDeckHandler or something?

/// StreamDeck object
pub struct StreamDeck {
    kind: Kind,
    device: HidDevice,
}

// current implemention
pub trait StreamDeckHandler {
  pub fn connect(vid: u16, pid: u16, serial: Option<String>) -> Result<StreamDeck, Error>
  pub fn connect_with_hid(api: &HidApi, vid: u16, pid: u16, serial: Option<String>) -> Result<StreamDeck, Error>
  // ...
}

impl StreamDeckHandler for StreamDeckPlus {
  // impl same as before
}

// This implements StreamDeckHandler + additional Module commands...
pub trait StreamDeckModuleHandler: StreamDeckHandler  {
  pub fn get_unit_information(&mut self) -> Result<String, Error>
}

impl StreamDeckModuleHandler for StreamDeckModule6Keys {
  // impl original+module-expanded commands
}

@FlowingSPDG FlowingSPDG marked this pull request as ready for review September 15, 2025 12:34

use image::codecs::jpeg::JpegEncoder;
use image::io::Reader;
use image::ImageReader;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +99 to +101
pub const MODULE_6_KEYS: u16 = 0x00B8;
pub const MODULE_15_KEYS: u16 = 0x00B9;
pub const MODULE_32_KEYS: u16 = 0x00BA;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +208 to +211
// Module devices does not support reset command
if self.kind().is_module() {
return Ok(());
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant