UNPKG

@xkeys-lib/core

Version:

NPM package to interact with the X-keys panels

101 lines 3.4 kB
export declare const XKEYS_VENDOR_ID = 1523; export interface Product { /** Name / Identifier of the X-keys panel */ name: string; /** * Identifiers for the HID device * @type {[productId: number, interface: number]} */ hidDevices: [number, number][]; /** Number of button data bytes, starting at index 2 */ bBytes: number; /** Number of bits in bByte used for buttons */ bBits: number; /** The number of physical columns, sort of */ colCount: number; /** The number of physical rows */ rowCount: number; /** If the X-keys panel has the Program Switch button. This is a special switch not in the normal switch matrix, if exists, there's only ever one per panel. */ hasPS: boolean; /** Byte offset for legacy backLight, bank 2 */ backLight2offset: number; /** * Physical layouts of the panel. To be used to draw a visual representation of the X-keys. * @type {[RegionTypeName: string, index: number, startRow: number, startCol: number, endRow: number, endCol: number]} */ layouts?: [string, number, number, number, number, number][]; /** Maps the (internal) keyIndex to a [Row, Column] */ btnLocation?: [number, number][]; /** The index of the start to the 4 byte time stamp. */ timestampByte?: number; hasJoystick?: { joyXbyte: number; joyYbyte: number; joyZbyte: number; }[]; /** If the X-keys panel has a Trackball. */ hasTrackball?: { trackXbyte_L: number; trackXbyte_H: number; trackYbyte_L: number; trackYbyte_H: number; }[]; /** If the X-keys panel has special buttons or digital inputs that do not map to the standard matrix. */ hasExtraButtons?: { ebByte: number; ebBit: number; }[]; /** If the X-keys panel has a Trackpad. */ hasTrackpad?: { padXbyte_L: number; padXbyte_H: number; padYbyte_L: number; padYbyte_H: number; pinchByte: number; scrollByte: number; }[]; /** If the X-keys device has an Analog to Digital converter. Often used to measure voltage*/ hasADC?: { adcByte_L: number; adcByte_H: number; }[]; /** If the X-keys panel has any Rotary Knobs. */ hasRotary?: { rotaryByte: number; }[]; /** used to determine what keyIndex to back light mapping should be used. */ backLightType: BackLightType; /** blocks certain keyIndex from calling button events. */ disableButtons?: number[]; hasJog?: { jogByte: number; }[]; hasShuttle?: { shuttleByte: number; }[]; hasTbar?: { tbarByte: number; }[]; hasLCD?: boolean; hasGPIO?: boolean; hasSerialData?: boolean; hasDMX?: boolean; } export declare enum BackLightType { /** No back lights */ NONE = 0, /** Legacy LED:s, blue and red backlights */ LEGACY = 2, /** Only blue light. Is the stick buttons, that requires special mapping. */ STICK_BUTTONS = 3, /** Backlight LED type 4, is the 40 buttons, map keyIndex-1 to ledIndex */ LINEAR = 4, /** Backlight LED type 5 is the RGB 24 buttons */ REMAP_24 = 5, /** Backlight LED type 6 is the RGB 2 banks most XKB modules */ RGBx2 = 6 } export declare const PRODUCTS: { [name: string]: Product; }; //# sourceMappingURL=products.d.ts.map