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 XL. Its thirty-two keys are arranged in a grid eight//! across and four down, each with its own 96x96 display, and it has//! neither encoders nor a touchscreen.//!//! `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 ElgatoStreamDeckXL = @This();
const KeyFeature = @import("../Keys.zig").KeyFeature;
pub const vendor: u16 = 0x0fd9;pub const product: u16 = 0x006c;
/// 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 = 8; /// The number of rows in the key grid. pub const rows: u5 = 4; /// 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 v2 header and flipped both ways because /// the displays are mounted upside down. pub fn getFeature(key: u8) ?KeyFeature { switch (key) { 0...31 => { return .{ .image = .{ .header_format = .v2, .image_format = .JPEG, .width = 96, .height = 96, .rotation = null, .flip_left_right = true, .flip_top_bottom = true, }, }; }, else => return null, } }};