-
Notifications
You must be signed in to change notification settings - Fork 12
/
products.ts
1150 lines (1123 loc) · 35 KB
/
products.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { literal } from './lib'
/*
* This file contains information about the various X-keys panels
*/
export 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 // the index of the low byte of 2 byte X position
trackXbyte_H: number // the index of the high byte of 2 byte X position
trackYbyte_L: number // the index of the low byte of 2 byte Y position
trackYbyte_H: number // the index of the high byte of 2 byte Y position
}[]
/** If the X-keys panel has special buttons or digital inputs that do not map to the standard matrix. */
hasExtraButtons?: {
ebByte: number // the index of the byte to find the extra button
ebBit: number // the index of the bit in that byte
}[]
/** If the X-keys panel has a Trackpad. */
hasTrackpad?: {
padXbyte_L: number // the index of the low byte of 2 byte X position
padXbyte_H: number // the index of the high byte of 2 byte X position
padYbyte_L: number // the index of the low byte of 2 byte Y position
padYbyte_H: number // the index of the high byte of 2 byte Y position
pinchByte: number // the index of the pinch byte
scrollByte: number // the index of the scroll byte
}[]
/** If the X-keys device has an Analog to Digital converter. Often used to measure voltage*/
hasADC?: {
adcByte_L: number // the index of the low byte of 2 byte ACD Value
adcByte_H: number // the index of the high byte of 2 byte ACD Value
}[]
/** If the X-keys panel has any Rotary Knobs. */
hasRotary?: { rotaryByte: number }[] // the index of any rotary control bytes (twist knob)
/** 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 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 const PRODUCTS: { [name: string]: Product } = {
// Note: The byte numbers are byte index (starts with 0) and will be offset from PIE SDK documentation by -2
// the byte index is used to access the exact byte in the data report.
XK24: literal<Product>({
name: 'XK-24',
hidDevices: [
[1029, 0],
[1027, 0],
],
bBytes: 4, // number of button bytes
bBits: 6, // number button bits per byte
layouts: [['Keys', 0, 1, 1, 6, 4]], // region type name, index, startRow, startCol, endRow, endCol
colCount: 4, // number of physical columns
rowCount: 6, // number of physical rows
hasPS: true,
backLightType: BackLightType.LEGACY,
backLight2offset: 32,
timestampByte: 6, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XK24RGB: literal<Product>({
name: 'XK-24M-RGB', // prototype XK24 with RGB backLight LEDs and mechanical
hidDevices: [[1404, 0]],
bBytes: 4, // number of button bytes
bBits: 6, // number button bits per byte
colCount: 4, // number of physical columns
rowCount: 6, // number of physical rows
hasPS: true,
backLightType: BackLightType.REMAP_24, //RGB Standard Index
backLight2offset: 0, // RGBs have no offset.
timestampByte: 6, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XK4: literal<Product>({
name: 'XK-4 Stick',
hidDevices: [
[1127, 0],
[1129, 0],
],
bBytes: 4,
bBits: 1,
colCount: 4, // number of physical columns
rowCount: 1, // number of physical rows
hasPS: true, // slide switch on end
backLightType: BackLightType.STICK_BUTTONS, // only has blue light
backLight2offset: 0, //
timestampByte: 6, // ms time since device boot 4 byte BE
}),
XK8: literal<Product>({
name: 'XK-8 Stick',
hidDevices: [
[1130, 0],
[1132, 0],
],
bBytes: 4,
bBits: 2, // row1 = 0,1,2,3 row2=4,5,6,7
colCount: 8, // number of physical columns
rowCount: 1, // number of physical rows
hasPS: true, // slide switch on end
backLightType: BackLightType.STICK_BUTTONS, // only has blue light
backLight2offset: 0, //
timestampByte: 6, // ms time since device boot 4 byte BE
btnLocation: [
[0, 0],
[1, 1],
[1, 5],
[1, 2],
[1, 6],
[1, 3],
[1, 7],
[1, 4],
[1, 8],
], // map button index to [Row,Column] 0,0 is program switch
}),
XK16: literal<Product>({
name: 'XK-16 Stick',
hidDevices: [
[1049, 0],
[1051, 0],
[1213, 0],
[1216, 0],
],
bBytes: 4, // 4 button data bytes
bBits: 4, // not really rows, but the data comes like that (it is physically one row) row1= 0,1,2,3 row2=4,5,6,7 row3= 8,9,10,11 row4=12,13,14,15
colCount: 16, // number of physical columns
rowCount: 1, // number of physical rows
hasPS: true, // slide switch on end
backLightType: BackLightType.STICK_BUTTONS, // only has blue backlight
backLight2offset: 0, // only one set of LEDs under the buttons
timestampByte: 6, // ms time since device boot 4 byte BE
btnLocation: [
[0, 0],
[1, 1],
[1, 5],
[1, 9],
[1, 13],
[1, 2],
[1, 6],
[1, 10],
[1, 14],
[1, 3],
[1, 7],
[1, 11],
[1, 15],
[1, 4],
[1, 8],
[1, 12],
[1, 16],
],
}),
XK12JOG: literal<Product>({
name: 'XK-12 Jog-Shuttle',
hidDevices: [
[1062, 0],
[1064, 0],
],
bBytes: 4,
bBits: 3,
colCount: 4, // number of physical columns
rowCount: 3, // number of physical rows
hasPS: true,
hasJog: [{ jogByte: 6 }],
hasShuttle: [{ shuttleByte: 7 }],
backLightType: BackLightType.LEGACY,
backLight2offset: 32,
timestampByte: 8, // ms time since device boot 4 byte BE
}),
XK12JOYSTICK: literal<Product>({
name: 'XK-12 Joystick',
hidDevices: [
[1065, 0],
[1067, 0],
],
bBytes: 4,
bBits: 3,
colCount: 4, // number of physical columns
rowCount: 3, // number of physical rows
hasPS: true,
hasJoystick: [
{
joyXbyte: 6, //Joystick X motion, 0 to 127 from center to full right, 255 to 129 from center to full left, 0 at center.
joyYbyte: 7, //Joystick Y motion, 0 to 127 from center to full down, 255 to 129 from center to full up, 0 at center.
joyZbyte: 8, //Joystick Z motion, twist of stick, absolute 0 to 255, rolls over,
},
],
backLightType: BackLightType.LEGACY,
backLight2offset: 32, // offset used to access second bank of LEDs, usually the red is on bank 2
timestampByte: 12,
}),
XK68JOYSTICK: literal<Product>({
name: 'XK-68 Joystick',
hidDevices: [
[1117, 0],
[1119, 0],
],
bBytes: 10,
bBits: 8,
layouts: [
['Keys', 0, 1, 1, 8, 10],
['Joystick', 0, 4, 4, 6, 7],
], // region type name, index, startRow, startCol, endRow, endCol
colCount: 10, // number of physical columns,
rowCount: 8, // number of physical rows
hasPS: true,
hasJoystick: [
{
joyXbyte: 14, //Joystick X motion, 0 to 127 from center to full right, 255 to 129 from center to full left, 0 at center.
joyYbyte: 15, //Joystick Y motion, 0 to 127 from center to full down, 255 to 129 from center to full up, 0 at center.
joyZbyte: 16, //Joystick Z motion, twist of stick, absolute 0 to 255, rolls over
},
],
backLightType: BackLightType.LEGACY,
backLight2offset: 80, // offset used to access second bank of LEDs, usually the red is on bank 2
timestampByte: 18, // ms time since device boot 4 byte BE
disableButtons: [28, 29, 30, 36, 37, 38, 44, 45, 46, 52, 53, 54], // these are the index of the "hole" created by the joystick in the center, they will always be 0
}),
XKR32: literal<Product>({
// discontinued product, XKE 40 is viable replacement
name: 'XKR-32',
hidDevices: [
[1279, 0],
[1282, 0],
],
bBytes: 4, // 4 button data bytes
bBits: 8,
colCount: 16, // number of physical columns,
rowCount: 2, // number of physical rows
hasPS: false, // unknown
backLightType: BackLightType.LEGACY,
backLight2offset: 32,
timestampByte: 31, // ms time since device boot 4 byte BE
}),
XKE40: literal<Product>({
name: 'XKE-40',
hidDevices: [
[1355, 0],
[1356, 0],
[1357, 0],
[1358, 0],
[1359, 0],
[1360, 0],
[1361, 0],
],
bBytes: 5, // 5 button data bytes
bBits: 8, // row1=0,8,16,24,32 row2=1,9,17,25,33 row3=2,10,18,26,34 row4=3,11,19,27,35 row5=4,12,20,28,36 row6=5,13,21,29,37 row7=6,14,22,30,38 row8=7,15,23,31,39
colCount: 20, // number of physical columns,
rowCount: 2, // number of physical rows
hasPS: true, // behind small hole on right side.
backLightType: BackLightType.LINEAR, // map keyIndex-1 to ledIndex
backLight2offset: 40, // off set to control second led bank.
timestampByte: 31, // ms time since device boot 4 byte BE
btnLocation: [
[0, 0],
[1, 1],
[1, 2],
[1, 3],
[1, 4],
[1, 5],
[1, 6],
[1, 7],
[1, 8],
[1, 9],
[1, 10],
[1, 11],
[1, 12],
[1, 13],
[1, 14],
[1, 15],
[1, 16],
[1, 17],
[1, 18],
[1, 19],
[1, 20],
[2, 1],
[2, 2],
[2, 3],
[2, 4],
[2, 5],
[2, 6],
[2, 7],
[2, 8],
[2, 9],
[2, 10],
[2, 11],
[2, 12],
[2, 13],
[2, 14],
[2, 15],
[2, 16],
[2, 17],
[2, 18],
[2, 19],
[2, 20],
],
}),
XK60: literal<Product>({
name: 'XK-60', // the USB hardware string will report "xkeys 80 HID" because it uses the same firmware as 80, the PID tells the difference
hidDevices: [
[1121, 0],
[1123, 0],
[1231, 0],
[1234, 0],
],
bBytes: 10,
bBits: 8,
layouts: [
['Keys', 0, 1, 1, 2, 10],
['Keys', 1, 4, 1, 8, 20],
['Keys', 2, 4, 4, 8, 7],
['Keys', 3, 4, 9, 8, 10],
], // control name, control index, startRow, startCol, endRow, endCol
colCount: 10, // number of physical columns,
rowCount: 8, // number of physical rows
hasPS: true,
backLightType: BackLightType.LEGACY,
backLight2offset: 80,
timestampByte: 12, // ms time since device boot 4 byte BE
//disableButtons: [2,10,18,26,34,42,50,58,66,74,19,20,21,22,23,59,60,61,] // these buttons are not installed on the 60 button unit, these bytes will always be 0.
}),
XK80: literal<Product>({
name: 'XK-80',
hidDevices: [
[1089, 0],
[1091, 0],
[1217, 0],
[1220, 0],
],
bBytes: 10,
bBits: 8,
colCount: 10, // number of physical columns
rowCount: 8, // number of physical rows
hasPS: true,
backLightType: BackLightType.LEGACY,
backLight2offset: 80,
timestampByte: 12, // ms time since device boot 4 byte BE
}),
XKE124TBAR: literal<Product>({
name: 'XKE-124 T-bar',
hidDevices: [
[1275, 0],
[1278, 0],
],
bBytes: 16,
bBits: 8,
layouts: [
['Keys', 0, 1, 1, 8, 16],
['Tbar', 0, 5, 14, 8, 14],
], // control name, control index, startRow, startCol, endRow, endCol
colCount: 16, //number of physical columns
rowCount: 8, // number of physical rows
hasPS: false,
hasTbar: [
{
tbarByte: 28, //this gives a clean 0-255 value
},
],
backLightType: BackLightType.LEGACY,
backLight2offset: 128,
//timeStamp: 31, // the XKE-124 T-bar has no time stamp for technical reasons
disableButtons: [109, 110, 111, 112],
}),
XKE128: literal<Product>({
name: 'XKE-128',
hidDevices: [
[1227, 0],
[1230, 0],
],
bBytes: 16,
bBits: 8,
colCount: 16, // number of physical columns
rowCount: 8, // number of physical rows
hasPS: false,
backLightType: BackLightType.LEGACY,
backLight2offset: 128,
timestampByte: 31, // ms time since device boot 4 byte BE
}),
XKMatrix: literal<Product>({
name: 'XK-128 Matrix', // this is a bare encoder board that can encode a 8x16 switch matrix
hidDevices: [
[1030, 0],
[1032, 0],
],
bBytes: 16,
bBits: 8,
colCount: 16, // number of virtual columns
rowCount: 8, // number of virtual rows
hasPS: true, // slide switch on board
backLightType: BackLightType.NONE, // no back light, only the 2 standard indicator LEDs, also available on header, see documentation
backLight2offset: 0,
timestampByte: 18, // ms time since device boot 4 byte BE
// many buttons may be disabled or not as the custom wiring determines this.
// to prevent phantom buttons, external diodes may be required, if diodes not used the board may be set by write command 215, see documentation
}),
XK68JOGSHUTTLE: literal<Product>({
name: 'XK-68 Jog-Shuttle',
hidDevices: [
[1114, 0],
[1116, 0],
],
bBytes: 10,
bBits: 8,
layouts: [
['Keys', 0, 1, 1, 8, 10],
['Jog-Shuttle', 0, 6, 4, 8, 7],
], // control name, control index, startRow, startCol, endRow, endCol
colCount: 10, // number of physical columns
rowCount: 8, // number of physical rows
hasPS: true,
hasJog: [{ jogByte: 16 }],
hasShuttle: [{ shuttleByte: 17 }],
backLightType: BackLightType.LEGACY,
backLight2offset: 80,
timestampByte: 18, // ms time since device boot 4 byte BE
disableButtons: [30, 31, 32, 38, 39, 40, 46, 47, 48, 54, 55, 56],
}),
XK3FOOT: literal<Product>({
name: 'XK-3 Foot Pedal',
hidDevices: [
[1080, 0],
[1082, 0],
],
bBytes: 1,
bBits: 4, // Bit 1=0, bit 2=left pedal, bit 3=middle pedal, bit 4= right pedal, bits 5-8=0.
colCount: 3, // 3 pedals in a row
rowCount: 1, // number of physical rows, note the first bit is not used here
hasPS: true, // inside unit and not very accessible
backLightType: BackLightType.NONE, // no back light LEDs
backLight2offset: 0,
timestampByte: 18, // ms time since device boot 4 byte BE
btnLocation: [
[0, 0],
[0, 0], // the keyIndex of 1 on this panel does not exist
[1, 1],
[1, 2],
[1, 3],
],
disableButtons: [1],
}),
XK3SI: literal<Product>({
name: 'XK-3 Switch Interface', // one 3.5 mm port, contacts for a TRRS Plug
hidDevices: [
[1221, 0],
[1224, 0],
],
bBytes: 1,
bBits: 5, // Bit 1=SW2, bit 2= SW1, bits 3 is unset if nothing is plugged in and set if anything is plugged in, bit 4=undefined, bit 5=SW3 bits 6,7,8=0.
colCount: 3, // 3 Switches possible, the best UI is probably 3 boxes side by side
rowCount: 1, //
hasPS: false, // none
backLightType: BackLightType.NONE, // no back light LEDs
backLight2offset: 0,
timestampByte: 31, // ms time since device boot 4 byte BE
btnLocation: [
[0, 0],
[1, 1],
[1, 2],
[1, 0],
[2, 0],
[1, 3],
], // bit 3 has been mapped to R1,C0 this is the bit that is set if any plug is in the 3.5 mm socket. Helps tell between no switch attached or just no switches pressed.
disableButtons: [4], // Exclude index 4, redundant on index 3, note some or all of the buttons may be triggered when plugging switch into 3.5 mm socket
}),
XK12SI: literal<Product>({
name: 'XK-12 Switch Interface', // six 3.5 mm ports, contacts for a stereo Plug
hidDevices: [
[1192, 0],
[1195, 0],
],
bBytes: 2,
bBits: 8, // see documentation
layouts: [
['SwitchPorts', 0, 1, 1, 2, 3],
['SwitchPorts', 1, 1, 4, 2, 6],
], // control name, control index, startRow, startCol, endRow, endCol
colCount: 6, // 3 ports per side of unit , numbered 1-3 and 4-6
rowCount: 2, // each port has 2 switches
hasPS: false, // none
backLightType: BackLightType.NONE, // no back light LEDs
backLight2offset: 0,
timestampByte: 31, // ms time since device boot 4 byte BE
btnLocation: [
[0, 0],
[2, 1],
[1, 1],
[2, 2],
[1, 2],
[2, 3],
[1, 3],
[2, 4],
[1, 4],
[2, 5],
[1, 5],
[2, 6],
[1, 6],
], // column indicates port #, mono plugs map to row 1, stereo plugs to row 1 and 2
// due to the stereo jack some buttons may always be down when a single pole (mono) plug is plugged in.
}),
XKHD15WI: literal<Product>({
name: 'XK-HD15 Wire Interface', // HD15 connector for 10 inputs and two 3.5 mm ports, contacts for a stereo Plug
hidDevices: [
[1244, 0],
[1247, 0],
],
bBytes: 2,
bBits: 8, // see documentation
colCount: 1, // difficult to describe with Rows and Columns, so just a list may be the best
rowCount: 14, // 14 inputs
hasPS: false, // none
backLightType: BackLightType.NONE, // no back light LEDs but has 2 digital outputs on the HD 15 wire. See documentation
backLight2offset: 0,
timestampByte: 31, // ms time since device boot 4 byte BE
}),
XKHD15GPIO: literal<Product>({
name: 'XK-HD15 GPIO', // HD15 connector for 10 digital outputs or can be configured to inputs, and two 3.5 mm ports, contacts for a stereo Plug
hidDevices: [
[1351, 0],
[1354, 0],
],
bBytes: 2,
bBits: 8, // see documentation
colCount: 1, // difficult to describe with Rows and Columns, so just a list may be the best
rowCount: 14, // 14 inputs possible, check config
hasPS: false, // none
backLightType: BackLightType.NONE, // no back light LEDs but has 2 or more digital outputs on the HD 15 wire. See documentation
backLight2offset: 0,
hasGPIO: true,
timestampByte: 31, // ms time since device boot 4 byte BE
//The input data will always be in the 2 data bytes described, but this device may be configured in several ways
// it is best to Query the device and get its current setup data, using GetIoConfiguration function
}),
XCRS232: literal<Product>({
name: 'XC-RS232-DB9', // DB9 connector for RS232 and six 3.5 mm ports, contacts for a stereo Plug
hidDevices: [
[1257, 0],
[1260, 0],
],
bBytes: 2,
bBits: 8, // see documentation
layouts: [
['SwitchPorts', 0, 1, 1, 2, 3],
['SwitchPorts', 1, 1, 4, 2, 6],
], // control name, control index, startRow, startCol, endRow, endCol
colCount: 3, // 3 ports per side of unit , the best UI is probably 3 boxes side by side then 4 rows
rowCount: 4, // each port has 2 switches
hasPS: false, // none
backLightType: BackLightType.NONE, // no back light LEDs but has 2 or more digital outputs on the HD 15 wire. See documentation
backLight2offset: 0,
hasSerialData: true,
btnLocation: [
[0, 0],
[2, 1],
[1, 1],
[2, 2],
[1, 2],
[2, 3],
[1, 3],
[2, 4],
[1, 4],
[2, 5],
[1, 5],
[2, 6],
[1, 6],
], // column indicates port #, mono plugs map to row 1, stereo plugs to row 1 and 2
//The Serial data will come on a special message with byte 1 id of 216, see documentation
}),
XCDMX512TST: literal<Product>({
name: 'XC-DMX512-T ST', // Screw Terminal connector for DMX512 and six 3.5 mm ports, contacts for a stereo Plug
hidDevices: [[1324, 0]],
bBytes: 2,
bBits: 8, // see documentation
colCount: 6, // 3 ports per side of unit ,
rowCount: 2, // each port has 2 switches
hasPS: false, // none
backLightType: BackLightType.NONE, // no back light LEDs
backLight2offset: 0,
hasDMX: true,
//Sends DMX512 Data, see documentation
}),
XCDMX512TRJ45: literal<Product>({
name: 'XC-DMX512-T RJ45', // RJ45 connector for DMX512 and four 3.5 mm ports, contacts for a stereo Plug
hidDevices: [[1225, 0]],
bBytes: 1,
bBits: 8, // see documentation
colCount: 4, // 2 ports per side of unit ,
rowCount: 2, // each port has 2 switches
hasPS: false, // none
backLightType: BackLightType.NONE, // no back light LEDs
backLight2offset: 0,
hasDMX: true,
btnLocation: [
// columns are port number and row 1 is the first switch on the port and 2 is second
[0, 0],
[2, 1],
[1, 1],
[2, 2],
[1, 2],
[2, 3],
[1, 3],
[2, 4],
[1, 4],
],
//Sends DMX512 Data to DMX512 devices on the , see documentation
}),
XK16LCD: literal<Product>({
name: 'XK-16 LCD', // Has a 16x2 Alpha Numeric back lit LCD Display
hidDevices: [
[1316, 0],
[1317, 0],
[1318, 0],
[1319, 0],
[1320, 0],
[1321, -1],
[1322, 0],
],
bBytes: 4,
bBits: 4, //
colCount: 4, // physical columns
rowCount: 4, // physical rows
hasPS: true, // at top
hasLCD: true,
backLightType: BackLightType.LEGACY, // back light LEDs
backLight2offset: 32,
timestampByte: 31, // ms time since device boot 4 byte BE
}),
XKE180BROAD: literal<Product>({
name: 'XKE-180 Broadcast Keyboard', //
hidDevices: [[1443, 0]],
bBytes: 31,
bBits: 7, //
layouts: [
['Keys', 0, 1, 1, 2, 24],
['Keys', 1, 3, 1, 8, 2],
['QWERTY-77', 0, 3, 3, 8, 17],
['Keys', 2, 3, 18, 8, 20],
['NumPad-24', 0, 3, 21, 8, 24],
], // control name, control index, startRow, startCol, endRow, endCol
colCount: 24, // physical columns
rowCount: 8, // physical rows
hasPS: true, // at top right behind hole in end
backLightType: BackLightType.NONE, // back light LEDs
backLight2offset: 0,
timestampByte: 36, // ms time since device boot 4 byte BE
}),
XK64JOGTBAR: literal<Product>({
name: 'XKE-64 Jog T-bar',
hidDevices: [
[1325, 0],
[1326, 0],
[1327, 0],
[1328, 0],
[1329, 0],
[1330, 0],
[1331, 0],
],
bBytes: 10,
bBits: 8,
layouts: [
['Keys', 0, 1, 1, 8, 10],
['Jog-Shuttle', 0, 6, 1, 8, 4],
['Tbar', 0, 1, 10, 4, 10],
], // control name, control index, startRow, startCol, endRow, endCol
colCount: 10, // physical columns
rowCount: 8, // physical rows
hasPS: false,
hasJog: [{ jogByte: 18 }],
hasShuttle: [{ shuttleByte: 19 }],
hasTbar: [
{
tbarByte: 17,
},
],
backLightType: BackLightType.LEGACY,
backLight2offset: 80,
timestampByte: 31, // ms time since device boot 4 byte BE
disableButtons: [6, 7, 8, 14, 15, 16, 22, 23, 24, 30, 31, 32, 73, 74, 75, 73], // These bits are messy, better to ignore them
}),
XBK4X6: literal<Product>({
//new product, expected release Q4 2022
name: 'X-blox XBK-4x6 Module', // 24 key module with RGB backLight LEDs
hidDevices: [
[1365, 0],
[1366, 0],
[1367, 0],
[1368, 0],
[1369, 0],
[1370, 0],
[1371, 0],
],
bBytes: 4, // number of button bytes
bBits: 6, // number button bits per byte
colCount: 4, // number of physical columns
rowCount: 6, // number of physical rows
hasPS: false,
backLightType: BackLightType.RGBx2, //RGB 2 Bank, Standard Index
backLight2offset: 0, // RGBs have no offset.
timestampByte: 31, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XBK3X6: literal<Product>({
//new product, expected release Q4 2022
name: 'X-blox XBK-3x6 Module', // 18 key module with RGB backLight LEDs
hidDevices: [
[1378, 0],
[1379, 0],
[1380, 0],
[1381, 0],
[1382, 0],
[1383, 0],
[1384, 0],
],
bBytes: 3, // number of button bytes
bBits: 6, // number button bits per byte
colCount: 3, // number of physical columns
rowCount: 6, // number of physical rows
hasPS: false,
backLightType: BackLightType.RGBx2, //RGB 2 Bank,Standard Index
backLight2offset: 0, // RGBs have no offset.
timestampByte: 31, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XBA4X3JOG: literal<Product>({
//new product, expected release Q4 2022
name: 'X-blox XBA-4x3 Jog-Shuttle Module', // 12 key module with Jog Shuttle & RGB backLight LEDs
hidDevices: [
[1388, 0],
[1389, 0],
[1390, 0],
[1391, 0],
[1392, 0],
[1393, 0],
[1394, 0],
],
bBytes: 4, // number of button bytes
bBits: 3, // number button bits per byte
colCount: 4, // number of physical columns
rowCount: 3, // number of physical rows
hasPS: false,
hasJog: [{ jogByte: 12 }],
hasShuttle: [{ shuttleByte: 13 }],
backLightType: BackLightType.RGBx2, //RGB 2 Bank, Standard Index
backLight2offset: 0, // RGBs have no offset.
timestampByte: 31, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XBA3X6TBAR: literal<Product>({
//new product, expected release Q4 2022
name: 'X-blox XBA-3x6 T-bar Module', // 14 key module with T-bar, RGB backLight LEDs
hidDevices: [
[1396, 0],
[1397, 0],
[1398, 0],
[1399, 0],
[1400, 0],
[1401, 0],
[1402, 0],
],
bBytes: 3, // number of button bytes
bBits: 6, // number button bits per byte
colCount: 3, // number of physical columns
rowCount: 6, // number of physical rows
hasPS: false,
hasTbar: [
{
tbarByte: 8, // value Was incorrect, 8 is correct
},
],
backLightType: BackLightType.RGBx2, //RGB 2 Bank,Standard Index
backLight2offset: 0, // RGBs have no offset.
timestampByte: 31, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XBA4X3TRACKBALL: literal<Product>({
//new product, expected release Q4 2022
name: 'X-blox XBA-4x3 Trackball Module', // 12 key module with Trackball + 2 buttons & RGB backLight LEDs
hidDevices: [
[1488, 0],
[1489, 0],
[1490, 0],
[1491, 0],
[1492, 0],
[1493, 0],
[1494, 0],
],
bBytes: 4, // number of button bytes
bBits: 3, // number button bits per byte, : the 2 extra trackball buttons are on the 4 and 5 bits of byte 4,
colCount: 4, // number of physical columns
rowCount: 3, // number of physical rows, sort of not counting the trackball buttons
hasPS: false,
hasTrackball: [
{
trackXbyte_L: 7, //Delta X motion, Low byte of 2 byte date, X ball motion = 256*DELTA_X_H + DELTA_X_L.
trackXbyte_H: 8, //Delta X motion, High byte of 2 byte date, X ball motion = 256*DELTA_X_H + DELTA_X_L.
trackYbyte_L: 9, //Delta Y motion, Low byte of 2 byte date, Y ball motion = 256*DELTA_Y_H + DELTA_Y_L.
trackYbyte_H: 10, //Delta Y motion, High byte of 2 byte date, Y ball motion = 256*DELTA_Y_H + DELTA_Y_L.
},
],
// this handles extra button like would be beside the track ball.
hasExtraButtons: [
{
ebByte: 5, // the byte for the extra button
ebBit: 3, // the bit of the extra button
},
{
ebByte: 5, // the byte for the extra button
ebBit: 4, // the bit of the extra button
},
],
backLightType: BackLightType.RGBx2, //RGB 2 Bank, Standard Index
backLight2offset: 0, // RGBs have no offset.
timestampByte: 31, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XBK_QWERTY: literal<Product>({
//new product, expected release Q1 2023
name: 'X-blox XBK-QWERTY Module', // Typing Keyboard module with up to 32 columns & RGB backLight LEDs, basic module has only 16 columns, extra satellite boards add extra columns, see documentation
hidDevices: [
[1343, 0],
[1344, 0],
[1345, 0],
[1346, 0],
[1347, 0],
[1348, 0],
[1349, 0],
],
bBytes: 32, // number of button bytes
bBits: 6, // number button bits per byte
layouts: [
['Keys', 0, 1, 1, 6, 8], // left side satellite keys, optional
['QWERTY-85', 0, 1, 9, 6, 24], // Main QWERTY section, required
['Keys', 1, 1, 25, 6, 32], // right side satellite keys, optional
], // control name, control index, startRow, startCol, endRow, endCol
colCount: 32, // number of physical columns, not all rows have all columns because of the offset of the keys and large keys such space bar and shifts.
rowCount: 6, // number of physical rows
hasPS: false,
backLightType: BackLightType.RGBx2, //RGB 1 Bank, Standard Index
backLight2offset: 0, // RGBs have no offset.
timestampByte: 36, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XBK16X6: literal<Product>({
//new product, expected release Q1 2023
name: 'X-blox XBK-16x6 Module', // 96 key module with RGB backLight LEDs
hidDevices: [
[1496, 0],
[1497, 0],
[1498, 0],
[1499, 0],
[1500, 0],
[1501, 0],
[1502, 0],
],
bBytes: 16, // number of button bytes
bBits: 6, // number button bits per byte
colCount: 16, // number of physical columns
rowCount: 6, // number of physical rows
hasPS: false,
backLightType: BackLightType.RGBx2, //RGB 2 Bank, Standard Index
backLight2offset: 0, // RGBs have no offset.
timestampByte: 31, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XCDRCSERVO: literal<Product>({
//new product, expected release Q1 2023
name: 'XC-RC Servo', // Connections for 16 RC Servo Motors and four 3.5 mm ports, contacts for a stereo Plug
hidDevices: [[1364, 0]],
bBytes: 1,
bBits: 8, // see documentation
colCount: 4, // 2 ports per side of unit ,
rowCount: 2, // each port has 2 switches
hasPS: true, // may be inside box and require extra wires if needed.
backLightType: BackLightType.NONE, // no back light LEDs
backLight2offset: 0,
btnLocation: [
// columns are port number and row 1 is the first switch on the port and 2 is second
[0, 0],
[2, 1],
[1, 1],
[2, 2],
[1, 2],
[2, 3],
[1, 3],
[2, 4],
[1, 4],
],
}),
XCRELAY: literal<Product>({
//prototype product,
name: 'XC-Relay', // Connections 2 DPDT Relays and four 3.5 mm input ports, contacts for a stereo Plug
hidDevices: [[1363, 0]],
bBytes: 1,
bBits: 8, // see documentation
colCount: 4, // 2 ports per side of unit ,
rowCount: 2, // each port has 2 switches
hasPS: true, // may be inside box and require extra wires if needed.
backLightType: BackLightType.NONE, // no back light LEDs
backLight2offset: 0,
btnLocation: [
// columns are port number and row 1 is the first switch on the port and 2 is second
[0, 0],
[2, 1],
[1, 1],
[2, 2],
[1, 2],
[2, 3],
[1, 3],
[2, 4],
[1, 4],
],
}),
XCMOTORDRIVER: literal<Product>({
//prototype product,
name: 'XC-Motor Driver', // Connections for 4 DC Motors or 2 Stepper Motors, 4 Analog to Digital voltages, and 5 GPIOs
hidDevices: [[1456, 0]],
bBytes: 1,
bBits: 8, // see documentation
colCount: 4, // 2 ports per side of unit ,
rowCount: 2, // each port has 2 switches
hasPS: true, // may be inside box and require extra wires if needed.
hasGPIO: true,
hasADC: [
{
adcByte_L: 6, //ADC Value, Low byte of 2 byte date,
adcByte_H: 7, //ADC Value, High byte of 2 byte date,
},
{
adcByte_L: 8, //ADC Value, Low byte of 2 byte date,
adcByte_H: 9, //ADC Value, High byte of 2 byte date,
},
{
adcByte_L: 10, //ADC Value, Low byte of 2 byte date,
adcByte_H: 11, //ADC Value, High byte of 2 byte date,