Something went wrong. Try again.
A Zig library for driving Elgato Stream Deck devices over USB HID.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455// SPDX-FileCopyrightText: © 2025 Jeffrey C. Ollie <jeff@ocjtech.us>// SPDX-License-Identifier: MIT
//! The Stream Deck Mini MK2. It has the same six keys in a grid three//! across and two down as the original Mini, each with its own 80x80//! display, and differs only in taking JPEG rather than BMP images.//!//! `devices.zig` gathers this module together with the one for every//! other model, so that the control groups can look up the properties//! of whichever device they are attached to.
const ElgatoStreamDeckMiniMK2 = @This();
const KeyFeature = @import("../Keys.zig").KeyFeature;
pub const vendor: u16 = 0x0fd9;pub const product: u16 = 0x0090;
/// What this model's keys look like and what they can do. Every device/// module declares this, so the fields and functions below are the same/// from one model to the next even though the values differ.pub const keys = struct { /// The number of columns in the key grid. pub const cols: u5 = 3; /// The number of rows in the key grid. pub const rows: u5 = 2; /// The number of touch keys beyond the grid. This model has none. pub const touch: u5 = 0; /// The total number of keys, the grid and the touch keys together. pub const count: u8 = @as(u8, cols) * rows + touch;
/// What the given key is capable of, or null if this model has no /// such key. Keys are numbered from zero. Every key here displays a /// JPEG image sent with a v1 header, turned a quarter turn first /// because the displays are mounted on their side. pub fn getFeature(key: u8) ?KeyFeature { switch (key) { 0...5 => { return .{ .image = .{ .header_format = .v1, .image_format = .BMP, .width = 80, .height = 80, .rotation = .@"90", .flip_left_right = true, .flip_top_bottom = false, }, }; }, else => return null, } }};