forked from nrkno/sofie-core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprompter_layout_xkeys.mw3
421 lines (410 loc) · 36.2 KB
/
prompter_layout_xkeys.mw3
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
'=↓=↓=↓= MW3 Header Start =↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=[MWTAG1]
' Script Type: MacroWorks 3 Device Script
' Device Name: X-keys XK-12 Jog & Shuttle
' Device Description: 12 Button HID Controller with Jog and Shuttle
' Script Name: XK-12 Jog & Shuttle
' Script Description: Macros for XK-12 Jog & Shuttle [MWTAG19]
' PID: 1062
' Firmware: π3 V 7
' MW3 Version: xx
' Script Language: Visual Basic
' Script Template: Beta 1.0
' Format: Unicode 8
' P.I. Engineering, Inc.
' "The No Slogan Company"
' Williamston, Michigan, USA
' www.xkeys.com
' Start Date: 11.11.2019 20:29:20 [MWTAG20]
' Last Update: 11.11.2019 21:18:43 [MWTAG21]
' Default Mode: Hardware
' Show Select Mode: True
' Image Rotation: 0
' Config Path: XK-12 Jog Shuttle\ReportConfig_XK12JogShuttle.xml [MWTAG18]
'=↑=↑=↑= MW3 Header End =↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=[/MWTAG1]
'=↓=↓=↓= Notes Start =↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=[MWTAG2]
' User comment notes can go here.
' CAUTION:
' DO NOT MODIFY COMMENT LINES OR TAGS
'
' This file can contain both true VB script code, and special hardware codes to program
' the X-keys device's internal memory. These hardware codes are auto-generated by the
' MW3.1 GUI and are indicated by commented lines ending or bracketed with [HWTAG1].
' DO NOT MODIFY THESE LINES!
' This can lead to corrupt data written to the device.
' Additionally other commented lines with [MWTAGx] or other formatting information
' for the GUI can be found through out this file. Modifying these comments can cause
' problems in the GUI. Always make back-ups before making any modifications to this file.
'
' ADDTIONAL NOTES:
' User comment notes can go here. This area is safe.
'=↑=↑=↑= Notes End =↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=[MWTAG2]
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Public Class Script
Implements Interfaces.IScript '[MWTAG12]
'=↓=↓=↓= Initialize Variables Start =↓=↓=↓=↓=↓=↓=↓=↓=[MWTAG3]
Dim MW3 As Interfaces.MW3
Dim MyDevice As Integer() = {1062, -1, 1} 'Device Descriptor [MWTAG8]
Dim AppName As String = "" 'Active application name
Dim AppTitle As String = "" 'Active application title
Dim Layer_Red As Integer = 0 'Red,3
'=↑=↑=↑= Initialize Varibles End =↑=↑=↑=↑=↑=↑=↑=↑=↑=[/MWTAG3]
Public Sub Initialize(MW3 As Interfaces.MW3) Implements Interfaces.IScript.Initialize
Me.MW3 = MW3
End Sub
Public Sub ScriptLoad() Implements Interfaces.IScript.ScriptLoad
LEDset()
MW3.SetAllBacklightLED(MyDevice,1,0) ' Turn red off
MW3.SetAllBacklightLED(MyDevice,0,1) ' Turn blue on
MW3.SetBacklightIntensity(MyDevice,255,255) 'blue and red max intensity
End Sub
Public Function ScriptUnload() As Boolean Implements Interfaces.IScript.ScriptUnload
End Function
Public Sub SysPowerChange(PowerState As Byte) Implements Interfaces.IScript.SysPowerChange
End Sub
Public Sub ActiveAppChange(ActiveAppTitle As String, ActiveAppName As String) Implements Interfaces.IScript.ActiveAppChange
AppName= ActiveAppName
AppTitle= ActiveAppTitle
End Sub
Public Sub DeviceChange(DevInfo As Integer(), plugged As Boolean) Implements Interfaces.IScript.DeviceChange
End Sub
Public Sub Initializing() Implements Interfaces.IScript.Initializing
End Sub
'=↓=↓=↓= Digital State Change Event Start =↓=↓=↓=↓=↓=↓=↓=[MWTAG4]
Public Sub XKEvent(CID As Integer, State As Boolean, Repeat As Integer, TimeStamp as Long, MessageData As Integer) Implements Interfaces.IScript.XKEvent
Select Case CID 'Button Check Start [MWTAG9]
Case 1001 'Button 001
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1002 'Button 002
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1003 'Button 003
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LShift↓LCtrl↓LAlt↓F9↓F9↑LAlt↑LCtrl↑LShift↑]>
'HW.sendScanCode("42:1,29:1,56:1,67:1,67:0,56:0,29:0,42:0")
'</Keys[LShift↓LCtrl↓LAlt↓F9↓F9↑LAlt↑LCtrl↑LShift↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1004 'Button 004
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1005 'Button 005
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1006 'Button 006
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LShift↓LCtrl↓LAlt↓F8↓F8↑LAlt↑LCtrl↑LShift↑]>
'HW.sendScanCode("42:1,29:1,56:1,66:1,66:0,56:0,29:0,42:0")
'</Keys[LShift↓LCtrl↓LAlt↓F8↓F8↑LAlt↑LCtrl↑LShift↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1007 'Button 007
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1008 'Button 008
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[<LShift>↓<LCtrl>↓<LAlt>↓<F12>↓<F12>↑<LAlt>↑<LCtrl>↑<LShift>↑]>
'HW.sendScanCode("42:1,29:1,56:1,88:1,88:0,56:0,29:0,42:0")
'</Keys[<LShift>↓<LCtrl>↓<LAlt>↓<F12>↓<F12>↑<LAlt>↑<LCtrl>↑<LShift>↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1009 'Button 009
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[<LShift>↓<LCtrl>↓<LAlt>↓<F11>↓<F11>↑<LAlt>↑<LCtrl>↑<LShift>↑]>
'HW.sendScanCode("42:1,29:1,56:1,87:1,87:0,56:0,29:0,42:0")
'</Keys[<LShift>↓<LCtrl>↓<LAlt>↓<F11>↓<F11>↑<LAlt>↑<LCtrl>↑<LShift>↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1010 'Button 010
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1011 'Button 011
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1012 'Button 012
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[<LShift>↓<LCtrl>↓<LAlt>↓<F10>↓<F10>↑<LAlt>↑<LCtrl>↑<LShift>↑]>
'HW.sendScanCode("42:1,29:1,56:1,68:1,68:0,56:0,29:0,42:0")
'</Keys[<LShift>↓<LCtrl>↓<LAlt>↓<F10>↓<F10>↑<LAlt>↑<LCtrl>↑<LShift>↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1024 'Shuttle +1
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LCtrl↓LAlt↓F1↓F1↑LAlt↑LCtrl↑]>
'HW.sendScanCode("29:1,56:1,59:1,59:0,56:0,29:0")
'</Keys[LCtrl↓LAlt↓F1↓F1↑LAlt↑LCtrl↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1025 'Shuttle +5
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LCtrl↓LAlt↓F5↓F5↑LAlt↑LCtrl↑]>
'HW.sendScanCode("29:1,56:1,63:1,63:0,56:0,29:0")
'</Keys[LCtrl↓LAlt↓F5↓F5↑LAlt↑LCtrl↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1026 'Shuttle -1
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LShift↓LCtrl↓LAlt↓F1↓F1↑LAlt↑LCtrl↑LShift↑]>
'HW.sendScanCode("42:1,29:1,56:1,59:1,59:0,56:0,29:0,42:0")
'</Keys[LShift↓LCtrl↓LAlt↓F1↓F1↑LAlt↑LCtrl↑LShift↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1027 'Shuttle -5
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LShift↓LCtrl↓LAlt↓F5↓F5↑LAlt↑LCtrl↑LShift↑]>
'HW.sendScanCode("42:1,29:1,56:1,63:1,63:0,56:0,29:0,42:0")
'</Keys[LShift↓LCtrl↓LAlt↓F5↓F5↑LAlt↑LCtrl↑LShift↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1028 'Jog CW
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[<LCtrl>↓<LAlt>↓+↓+↑<LAlt>↑<LCtrl>↑]>
'HW.sendScanCode("29:1,56:1,12:1,12:0,56:0,29:0")
'</Keys[<LCtrl>↓<LAlt>↓+↓+↑<LAlt>↑<LCtrl>↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1029 'Shuttle +2
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LCtrl↓LAlt↓F2↓F2↑LAlt↑LCtrl↑]>
'HW.sendScanCode("29:1,56:1,60:1,60:0,56:0,29:0")
'</Keys[LCtrl↓LAlt↓F2↓F2↑LAlt↑LCtrl↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1030 'Shuttle +6
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LCtrl↓LAlt↓F6↓F6↑LAlt↑LCtrl↑]>
'HW.sendScanCode("29:1,56:1,64:1,64:0,56:0,29:0")
'</Keys[LCtrl↓LAlt↓F6↓F6↑LAlt↑LCtrl↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1031 'Shuttle -2
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LShift↓LCtrl↓LAlt↓F2↓F2↑LAlt↑LCtrl↑LShift↑]>
'HW.sendScanCode("42:1,29:1,56:1,60:1,60:0,56:0,29:0,42:0")
'</Keys[LShift↓LCtrl↓LAlt↓F2↓F2↑LAlt↑LCtrl↑LShift↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1032 'Shuttle -6
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LShift↓LCtrl↓LAlt↓F6↓F6↑LAlt↑LCtrl↑LShift↑]>
'HW.sendScanCode("42:1,29:1,56:1,64:1,64:0,56:0,29:0,42:0")
'</Keys[LShift↓LCtrl↓LAlt↓F6↓F6↑LAlt↑LCtrl↑LShift↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1033 'Jog CCW
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[<LCtrl>↓<LAlt>↓-↓-↑<LAlt>↑<LCtrl>↑]>
'HW.sendScanCode("29:1,56:1,53:1,53:0,56:0,29:0")
'</Keys[<LCtrl>↓<LAlt>↓-↓-↑<LAlt>↑<LCtrl>↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1034 'Shuttle +3
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LCtrl↓LAlt↓F3↓F3↑LAlt↑LCtrl↑]>
'HW.sendScanCode("29:1,56:1,61:1,61:0,56:0,29:0")
'</Keys[LCtrl↓LAlt↓F3↓F3↑LAlt↑LCtrl↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1035 'Shuttle +7
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LCtrl↓LAlt↓F7↓F7↑LAlt↑LCtrl↑]>
'HW.sendScanCode("29:1,56:1,65:1,65:0,56:0,29:0")
'</Keys[LCtrl↓LAlt↓F7↓F7↑LAlt↑LCtrl↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1036 'Shuttle -3
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LShift↓LCtrl↓LAlt↓F3↓F3↑LAlt↑LCtrl↑LShift↑]>
'HW.sendScanCode("42:1,29:1,56:1,61:1,61:0,56:0,29:0,42:0")
'</Keys[LShift↓LCtrl↓LAlt↓F3↓F3↑LAlt↑LCtrl↑LShift↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1037 'Shuttle -7
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LShift↓LCtrl↓LAlt↓F7↓F7↑LAlt↑LCtrl↑LShift↑]>
'HW.sendScanCode("42:1,29:1,56:1,65:1,65:0,56:0,29:0,42:0")
'</Keys[LShift↓LCtrl↓LAlt↓F7↓F7↑LAlt↑LCtrl↑LShift↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1038 'Shuttle 0
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LShift↓LCtrl↓LAlt↓9↓9↑LAlt↑LCtrl↑LShift↑]>
'HW.sendScanCode("42:1,29:1,56:1,10:1,10:0,56:0,29:0,42:0")
'</Keys[LShift↓LCtrl↓LAlt↓9↓9↑LAlt↑LCtrl↑LShift↑]>
'<Keys[<LShift>↓<LCtrl>↓<LAlt>↓-↓-↑<LAlt>↑<LCtrl>↑<LShift>↑<LShift>↓<LCtrl>↓<LAlt>↓-↓-↑<LAlt>↑<LCtrl>↑<LShift>↑<LShift>↓<LCtrl>↓<LAlt>↓-↓-↑<LAlt>↑<LCtrl>↑<LShift>↑<LShift>↓<LCtrl>↓<LAlt>↓-↓-↑<LAlt>↑<LCtrl>↑<LShift>↑<LShift>↓<LCtrl>↓<LAlt>↓-↓-↑<LAlt>↑<LCtrl>↑<LShift>↑<LShift>↓<LCtrl>↓<LAlt>↓+↓+↑<LAlt>↑<LCtrl>↑<LShift>↑<LShift>↓<LCtrl>↓<LAlt>↓+↓+↑<LAlt>↑<LCtrl>↑<LShift>↑<LShift>↓<LCtrl>↓<LAlt>↓+↓+↑<LAlt>↑<LCtrl>↑<LShift>↑]>
'HW.sendScanCode("42:1,29:1,56:1,53:1,53:0,56:0,29:0,42:0,42:1,29:1,56:1,53:1,53:0,56:0,29:0,42:0,42:1,29:1,56:1,53:1,53:0,56:0,29:0,42:0,42:1,29:1,56:1,53:1,53:0,56:0,29:0,42:0,42:1,29:1,56:1,53:1,53:0,56:0,29:0,42:0,42:1,29:1,56:1,12:1,12:0,56:0,29:0,42:0,42:1,29:1,56:1,12:1,12:0,56:0,29:0,42:0,42:1,29:1,56:1,12:1,12:0,56:0,29:0,42:0")
'</Keys[<LShift>↓<LCtrl>↓<LAlt>↓-↓-↑<LAlt>↑<LCtrl>↑<LShift>↑<LShift>↓<LCtrl>↓<LAlt>↓-↓-↑<LAlt>↑<LCtrl>↑<LShift>↑<LShift>↓<LCtrl>↓<LAlt>↓-↓-↑<LAlt>↑<LCtrl>↑<LShift>↑<LShift>↓<LCtrl>↓<LAlt>↓-↓-↑<LAlt>↑<LCtrl>↑<LShift>↑<LShift>↓<LCtrl>↓<LAlt>↓-↓-↑<LAlt>↑<LCtrl>↑<LShift>↑<LShift>↓<LCtrl>↓<LAlt>↓+↓+↑<LAlt>↑<LCtrl>↑<LShift>↑<LShift>↓<LCtrl>↓<LAlt>↓+↓+↑<LAlt>↑<LCtrl>↑<LShift>↑<LShift>↓<LCtrl>↓<LAlt>↓+↓+↑<LAlt>↑<LCtrl>↑<LShift>↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1039 'Shuttle +4
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LCtrl↓LAlt↓F4↓F4↑LAlt↑LCtrl↑]>
'HW.sendScanCode("29:1,56:1,62:1,62:0,56:0,29:0")
'</Keys[LCtrl↓LAlt↓F4↓F4↑LAlt↑LCtrl↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1040 'Shuttle -4
'Layer_1 [HWTAG1]
'Press [HWTAG2]
'<Keys[LShift↓LCtrl↓LAlt↓F4↓F4↑LAlt↑LCtrl↑LShift↑]>
'HW.sendScanCode("42:1,29:1,56:1,62:1,62:0,56:0,29:0,42:0")
'</Keys[LShift↓LCtrl↓LAlt↓F4↓F4↑LAlt↑LCtrl↑LShift↑]>
If State 'Pressed [MWTAG10]
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
Case 1015 'ProgSwitch -restricted-
If State 'Pressed [MWTAG10]
'<Open-Close GUI>
If MW3.IsGUIOpen(MyDevice)
MW3.SetGUI(MyDevice,0,false)
Else
MW3.SetGUI(MyDevice,0,true)
End If
'</Open-Close GUI>
Else 'Released [MWTAG11]
End If 'Press-Release [/MWTAG10/MWTAG11]
End Select 'Button Check End [/MWTAG9]
If Repeat = 0
LEDset() ' Set the Indicator LEDs
End If
End Sub
'=↑=↑=↑= Digital State Change Event End ↑=↑=↑=↑=↑=↑=↑=↑=↑=[/MWTAG4]
'=↓=↓=↓=Indicator LEDs Start =↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=↓=[MWTAG5]
Public Sub LEDset()
If Layer_Red = 1
MW3.SetLED(MyDevice,3001,0)
MW3.SetLED(MyDevice,3002,1) 'Turn on the Red Indicator LED
Else
MW3.SetLED(MyDevice,3002,0)'Turn off the Red Indicator LED
MW3.SetLED(MyDevice,3001,1)
End if
End Sub
'=↑=↑=↑= Indicator LEDs End ↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=↑=[/MWTAG5]
'=↓=↓=↓=String Data Received Event Start =↓=↓=↓=↓=↓=↓=↓=↓=[MWTAG6]
Public Sub XKStringEvent(CID As Integer, StringData As String, Repeat As Integer, TimeStamp as Long, MessageData As Integer) Implements Interfaces.IScript.XKStringEvent
'String data is sent to this routine, this device does not send string data but this is required for MW3 compatibility.
End Sub
'=↑=↑=↑= String Data Received Event End ↑=↑=↑=↑=↑=↑=↑=↑=↑=[/MWTAG6]
'=↓=↓=↓= Analog Data Received Event Start =↓=↓=↓=↓=↓=↓=↓=↓[MWTAG7]
Public Sub XKAnalogEvent(CID As Integer, AnalogValue As Integer(), Repeat As Integer, TimeStamp as Long, MessageData As Integer) Implements Interfaces.IScript.XKAnalogEvent
REM 'This demo script has been set up for the Shuttle to send one keystroke repeatedly at increasingly faster speeds the further it is turned from the center.
REM 'The keys below can be changed to match your application by changing the number "in quotations" on the Dim... line to the scancode of the key you wish to send.
REM 'For information on other options, please check out www.xkeys.com
REM Dim Rate As Integer 'repeat rate - These numbers can be edited below each individual Analog Value to set the repeat rate as short or long as needed. Lower number = faster repeat
REM 'Shuttle keystrokes are repeated at the Rate shown for each Analog position.
REM Dim ShuttleKeyR As String = "333" 'scancode (right arrow) of key to send if shuttle is turned to the right
REM Dim ShuttleKeyL As String = "331" 'scancode (left arrow) of key to send if shuttle is turned to the left
REM 'Jog keystrokes are sent once for each position the jog wheel is moved and do not repeat.
REM Dim JogKeyCW As String = "333" 'scancode (right arrow) of key to send if jog is turned clockwise
REM Dim JogKeyCCW As String = "331" 'scancode (left arrow) of key to send if jog is turned counterclockwise
REM Select Case CID 'Analog Check Start [MWTAG13]
REM Case 2001 'Shuttle Wheel
REM If AnalogValue(0)=1
REM MW3.sendScanCode(ShuttleKeyR & ":1," & ShuttleKeyR & ":0")
REM Rate=500
REM Else If AnalogValue(0)=2
REM MW3.sendScanCode(ShuttleKeyR & ":1," & ShuttleKeyR & ":0")
REM Rate=500
REM Else If AnalogValue(0)=3
REM MW3.sendScanCode(ShuttleKeyR & ":1," & ShuttleKeyR & ":0")
REM Rate=100
REM Else If AnalogValue(0)=4
REM MW3.sendScanCode(ShuttleKeyR & ":1," & ShuttleKeyR & ":0")
REM Rate=67
REM Else If AnalogValue(0)=5
REM MW3.sendScanCode(ShuttleKeyR & ":1," & ShuttleKeyR & ":0")
REM Rate=33
REM Else If AnalogValue(0)=6
REM MW3.sendScanCode(ShuttleKeyR & ":1," & ShuttleKeyR & ":0")
REM Rate=22
REM Else If AnalogValue(0)=7
REM MW3.sendScanCode(ShuttleKeyR & ":1," & ShuttleKeyR & ":0")
REM Rate=10
REM Else If AnalogValue(0)=255
REM MW3.sendScanCode(ShuttleKeyL & ":1," & ShuttleKeyL & ":0")
REM Rate=500
REM Else If AnalogValue(0)=254
REM MW3.sendScanCode(ShuttleKeyL & ":1," & ShuttleKeyL & ":0")
REM Rate=500
REM Else If AnalogValue(0)=253
REM MW3.sendScanCode(ShuttleKeyL & ":1," & ShuttleKeyL & ":0")
REM Rate=100
REM Else If AnalogValue(0)=252
REM MW3.sendScanCode(ShuttleKeyL & ":1," & ShuttleKeyL & ":0")
REM Rate=67
REM Else If AnalogValue(0)=251
REM MW3.sendScanCode(ShuttleKeyL & ":1," & ShuttleKeyL & ":0")
REM Rate=33
REM Else If AnalogValue(0)=250
REM MW3.sendScanCode(ShuttleKeyL & ":1," & ShuttleKeyL & ":0")
REM Rate=22
REM Else If AnalogValue(0)=249
REM MW3.sendScanCode(ShuttleKeyL & ":1," & ShuttleKeyL & ":0")
REM Rate=10
REM End If
REM If AnalogValue(0) <> 0
REM MW3.RepeatCID(MyDevice, CID, AnalogValue, 0, Rate)
REM End If
REM Case 4001 'Jog Wheel
REM If AnalogValue(0)=1
REM 'send clockwise
REM MW3.sendScanCode(JogKeyCW & ":1," & JogKeyCW & ":0")
REM Else If AnalogValue(0)=255
REM 'send counterclockwise
REM MW3.sendScanCode(JogKeyCCW & ":1," & JogKeyCCW & ":0")
REM End If
REM End Select 'Analog Check End [/MWTAG13]
End Sub
'=↑=↑=↑= Analog Data Received Event End ↑=↑=↑=↑=↑=↑=↑=↑=↑=[/MWTAG7]
End Class '[/MWTAG12]