// SPDX-FileCopyrightText: © 2025 Jeffrey C. Ollie // SPDX-License-Identifier: MIT //! The Stream Deck Plus. Eight keys with 120x120 displays are arranged //! in a grid four across and two down, and below them sit an 800x100 //! touchscreen and four rotary encoders; those are described by //! `Touchscreen` and `Encoders` rather than here. //! //! `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 ElgatoStreamDeckPlus = @This(); const KeyFeature = @import("../Keys.zig").KeyFeature; pub const vendor: u16 = 0x0fd9; pub const product: u16 = 0x0084; /// 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 = 4; /// 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 v2 header, and unlike most models the /// displays need no rotation or flipping first. pub fn getFeature(key: u8) ?KeyFeature { switch (key) { 0...7 => { return .{ .image = .{ .header_format = .v2, .image_format = .JPEG, .width = 120, .height = 120, .rotation = null, .flip_left_right = false, .flip_top_bottom = false, }, }; }, else => return null, } } };