Last active
April 20, 2018 18:06
-
-
Save noseglasses/4c07d6eb8be00c1d9ff6d12113efbad0 to your computer and use it in GitHub Desktop.
Noseglasses Model01 sketch Glockenspiel generated C/C++ code (2018-04-20)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by Papageno compiler version | |
#pragma once | |
//############################################################################## | |
// Code parsed | |
//############################################################################## | |
/* | |
**** /home/flo/Inpartik/Development/Kaleidoscope/Kaleidoscope-Papageno/hardware/keyboardio/avr/libraries/Kaleidoscope-Papageno/glockenspiel/predefines.gls | |
2 | |
3 input type: KEYPOS | |
4 | |
5 action type: KEYCODE | |
6 action type: COMPLEX_KEYCODE | |
7 action type: KEYPOS | |
8 action type: USER_FUNCTION | |
9 | |
10 action: Key_NoEvent <KEYCODE> | |
11 action: Key_ErrorRollover <KEYCODE> | |
12 action: Key_PostFail <KEYCODE> | |
13 action: Key_ErrorUndefined <KEYCODE> | |
14 action: Key_A <KEYCODE> | |
15 action: Key_B <KEYCODE> | |
16 action: Key_C <KEYCODE> | |
17 action: Key_D <KEYCODE> | |
18 action: Key_E <KEYCODE> | |
19 action: Key_F <KEYCODE> | |
20 action: Key_G <KEYCODE> | |
21 action: Key_H <KEYCODE> | |
22 action: Key_I <KEYCODE> | |
23 action: Key_J <KEYCODE> | |
24 action: Key_K <KEYCODE> | |
25 action: Key_L <KEYCODE> | |
26 action: Key_M <KEYCODE> | |
27 action: Key_N <KEYCODE> | |
28 action: Key_O <KEYCODE> | |
29 action: Key_P <KEYCODE> | |
30 action: Key_Q <KEYCODE> | |
31 action: Key_R <KEYCODE> | |
32 action: Key_S <KEYCODE> | |
33 action: Key_T <KEYCODE> | |
34 action: Key_U <KEYCODE> | |
35 action: Key_V <KEYCODE> | |
36 action: Key_W <KEYCODE> | |
37 action: Key_X <KEYCODE> | |
38 action: Key_Y <KEYCODE> | |
39 action: Key_Z <KEYCODE> | |
40 action: Key_1 <KEYCODE> | |
41 action: Key_2 <KEYCODE> | |
42 action: Key_3 <KEYCODE> | |
43 action: Key_4 <KEYCODE> | |
44 action: Key_5 <KEYCODE> | |
45 action: Key_6 <KEYCODE> | |
46 action: Key_7 <KEYCODE> | |
47 action: Key_8 <KEYCODE> | |
48 action: Key_9 <KEYCODE> | |
49 action: Key_0 <KEYCODE> | |
50 action: Key_Enter <KEYCODE> | |
51 action: Key_Escape <KEYCODE> | |
52 action: Key_Backspace <KEYCODE> | |
53 action: Key_Tab <KEYCODE> | |
54 action: Key_Spacebar <KEYCODE> | |
55 action: Key_Minus <KEYCODE> | |
56 action: Key_Equals <KEYCODE> | |
57 action: Key_LeftBracket <KEYCODE> | |
58 action: Key_RightBracket <KEYCODE> | |
59 action: Key_Backslash <KEYCODE> | |
60 action: Key_NonUsPound <KEYCODE> | |
61 action: Key_Semicolon <KEYCODE> | |
62 action: Key_Quote <KEYCODE> | |
63 action: Key_Backtick <KEYCODE> | |
64 action: Key_Comma <KEYCODE> | |
65 action: Key_Period <KEYCODE> | |
66 action: Key_Slash <KEYCODE> | |
67 action: Key_CapsLock <KEYCODE> | |
68 action: Key_F1 <KEYCODE> | |
69 action: Key_F2 <KEYCODE> | |
70 action: Key_F3 <KEYCODE> | |
71 action: Key_F4 <KEYCODE> | |
72 action: Key_F5 <KEYCODE> | |
73 action: Key_F6 <KEYCODE> | |
74 action: Key_F7 <KEYCODE> | |
75 action: Key_F8 <KEYCODE> | |
76 action: Key_F9 <KEYCODE> | |
77 action: Key_F10 <KEYCODE> | |
78 action: Key_F11 <KEYCODE> | |
79 action: Key_F12 <KEYCODE> | |
80 action: Key_PrintScreen <KEYCODE> | |
81 action: Key_ScrollLock <KEYCODE> | |
82 action: Key_Pause <KEYCODE> | |
83 action: Key_Insert <KEYCODE> | |
84 action: Key_Home <KEYCODE> | |
85 action: Key_PageUp <KEYCODE> | |
86 action: Key_Delete <KEYCODE> | |
87 action: Key_End <KEYCODE> | |
88 action: Key_PageDown <KEYCODE> | |
89 action: Key_RightArrow <KEYCODE> | |
90 action: Key_LeftArrow <KEYCODE> | |
91 action: Key_DownArrow <KEYCODE> | |
92 action: Key_UpArrow <KEYCODE> | |
93 action: Key_KeypadNumLock <KEYCODE> | |
94 action: Key_KeypadDivide <KEYCODE> | |
95 action: Key_KeypadMultiply <KEYCODE> | |
96 action: Key_KeypadSubtract <KEYCODE> | |
97 action: Key_KeypadAdd <KEYCODE> | |
98 action: Key_KeypadEnter <KEYCODE> | |
99 action: Key_Keypad1 <KEYCODE> | |
100 action: Key_Keypad2 <KEYCODE> | |
101 action: Key_Keypad3 <KEYCODE> | |
102 action: Key_Keypad4 <KEYCODE> | |
103 action: Key_Keypad5 <KEYCODE> | |
104 action: Key_Keypad6 <KEYCODE> | |
105 action: Key_Keypad7 <KEYCODE> | |
106 action: Key_Keypad8 <KEYCODE> | |
107 action: Key_Keypad9 <KEYCODE> | |
108 action: Key_Keypad0 <KEYCODE> | |
109 action: Key_KeypadDot <KEYCODE> | |
110 action: Key_NonUsBackslashAndPipe <KEYCODE> | |
111 action: Key_PcApplication <KEYCODE> | |
112 action: Key_Power <KEYCODE> | |
113 action: Key_KeypadEquals <KEYCODE> | |
114 action: Key_F13 <KEYCODE> | |
115 action: Key_F14 <KEYCODE> | |
116 action: Key_F15 <KEYCODE> | |
117 action: Key_F16 <KEYCODE> | |
118 action: Key_F17 <KEYCODE> | |
119 action: Key_F18 <KEYCODE> | |
120 action: Key_F19 <KEYCODE> | |
121 action: Key_F20 <KEYCODE> | |
122 action: Key_F21 <KEYCODE> | |
123 action: Key_F22 <KEYCODE> | |
124 action: Key_F23 <KEYCODE> | |
125 action: Key_F24 <KEYCODE> | |
126 action: Key_Execute <KEYCODE> | |
127 action: Key_Help <KEYCODE> | |
128 action: Key_Menu <KEYCODE> | |
129 action: Key_Select <KEYCODE> | |
130 action: Key_Stop <KEYCODE> | |
131 action: Key_Again <KEYCODE> | |
132 action: Key_Undo <KEYCODE> | |
133 action: Key_Cut <KEYCODE> | |
134 action: Key_Copy <KEYCODE> | |
135 action: Key_Paste <KEYCODE> | |
136 action: Key_Find <KEYCODE> | |
137 action: Key_Mute <KEYCODE> | |
138 action: Key_VolumeUp <KEYCODE> | |
139 action: Key_VolumeDown <KEYCODE> | |
140 action: Key_LockingCapsLock <KEYCODE> | |
141 action: Key_LockingNumLock <KEYCODE> | |
142 action: Key_LockingScrollLock <KEYCODE> | |
143 action: Key_KeypadComma <KEYCODE> | |
144 action: Key_KeypadEqualSign <KEYCODE> | |
145 action: Key_International1 <KEYCODE> | |
146 action: Key_International2 <KEYCODE> | |
147 action: Key_International3 <KEYCODE> | |
148 action: Key_International4 <KEYCODE> | |
149 action: Key_International5 <KEYCODE> | |
150 action: Key_International6 <KEYCODE> | |
151 action: Key_International7 <KEYCODE> | |
152 action: Key_International8 <KEYCODE> | |
153 action: Key_International9 <KEYCODE> | |
154 action: Key_Lang1 <KEYCODE> | |
155 action: Key_Lang2 <KEYCODE> | |
156 action: Key_Lang3 <KEYCODE> | |
157 action: Key_Lang4 <KEYCODE> | |
158 action: Key_Lang5 <KEYCODE> | |
159 action: Key_Lang6 <KEYCODE> | |
160 action: Key_Lang7 <KEYCODE> | |
161 action: Key_Lang8 <KEYCODE> | |
162 action: Key_Lang9 <KEYCODE> | |
163 action: Key_AlternateErase <KEYCODE> | |
164 action: Key_Sysreq <KEYCODE> | |
165 action: Key_Cancel <KEYCODE> | |
166 action: Key_Clear <KEYCODE> | |
167 action: Key_Prior <KEYCODE> | |
168 action: Key_Return <KEYCODE> | |
169 action: Key_Separator <KEYCODE> | |
170 action: Key_Out <KEYCODE> | |
171 action: Key_Oper <KEYCODE> | |
172 action: Key_ClearSlashAgain <KEYCODE> | |
173 action: Key_CrselSlashProps <KEYCODE> | |
174 action: Key_Exsel <KEYCODE> | |
175 action: Key_Keypad00 <KEYCODE> | |
176 action: Key_Keypad000 <KEYCODE> | |
177 action: Key_ThousandsSeparator <KEYCODE> | |
178 action: Key_DecimalSeparator <KEYCODE> | |
179 action: Key_CurrencyUnit <KEYCODE> | |
180 action: Key_CurrencySubunit <KEYCODE> | |
181 action: Key_KeypadLeftParen <KEYCODE> | |
182 action: Key_KeypadRightParen <KEYCODE> | |
183 action: Key_KeypadLeftCurlyBrace <KEYCODE> | |
184 action: Key_KeypadRightCurlyBrace <KEYCODE> | |
185 action: Key_KeypadTab <KEYCODE> | |
186 action: Key_KeypadBackspace <KEYCODE> | |
187 action: Key_KeypadA <KEYCODE> | |
188 action: Key_KeypadB <KEYCODE> | |
189 action: Key_KeypadC <KEYCODE> | |
190 action: Key_KeypadD <KEYCODE> | |
191 action: Key_KeypadE <KEYCODE> | |
192 action: Key_KeypadF <KEYCODE> | |
193 action: Key_KeypadXor <KEYCODE> | |
194 action: Key_KeypadCarat <KEYCODE> | |
195 action: Key_KeypadPercent <KEYCODE> | |
196 action: Key_KeypadLessThan <KEYCODE> | |
197 action: Key_KeypadGreaterThan <KEYCODE> | |
198 action: Key_KeypadAmpersand <KEYCODE> | |
199 action: Key_KeypadDoubleampersand <KEYCODE> | |
200 action: Key_KeypadPipe <KEYCODE> | |
201 action: Key_KeypadDoublepipe <KEYCODE> | |
202 action: Key_KeypadColon <KEYCODE> | |
203 action: Key_KeypadPoundSign <KEYCODE> | |
204 action: Key_KeypadSpace <KEYCODE> | |
205 action: Key_KeypadAtSign <KEYCODE> | |
206 action: Key_KeypadExclamationPoint <KEYCODE> | |
207 action: Key_KeypadMemoryStore <KEYCODE> | |
208 action: Key_KeypadMemoryRecall <KEYCODE> | |
209 action: Key_KeypadMemoryClear <KEYCODE> | |
210 action: Key_KeypadMemoryAdd <KEYCODE> | |
211 action: Key_KeypadMemorySubtract <KEYCODE> | |
212 action: Key_KeypadMemoryMultiply <KEYCODE> | |
213 action: Key_KeypadMemoryDivide <KEYCODE> | |
214 action: Key_KeypadPlusSlashMinus <KEYCODE> | |
215 action: Key_KeypadClear <KEYCODE> | |
216 action: Key_KeypadClearEntry <KEYCODE> | |
217 action: Key_KeypadBinary <KEYCODE> | |
218 action: Key_KeypadOctal <KEYCODE> | |
219 action: Key_KeypadDecimal <KEYCODE> | |
220 action: Key_KeypadHexadecimal <KEYCODE> | |
221 action: Key_LeftControl <KEYCODE> | |
222 action: Key_LeftShift <KEYCODE> | |
223 action: Key_LeftAlt <KEYCODE> | |
224 action: Key_LeftGui <KEYCODE> | |
225 action: Key_RightControl <KEYCODE> | |
226 action: Key_RightShift <KEYCODE> | |
227 action: Key_RightAlt <KEYCODE> | |
228 action: Key_RightGui <KEYCODE> | |
229 | |
**** /home/flo/Inpartik/Development/Kaleidoscope/Kaleidoscope-Papageno/hardware/keyboardio/avr/libraries/Model01-Firmware/Model01-Firmware.ino | |
171 | |
172 default: event_timeout = $ 200 $ | |
173 | |
174 %############################################################################### | |
175 % Inputs | |
176 %############################################################################### | |
177 | |
178 % Thumb keys are numbered left to right | |
179 % | |
180 input: LeftThumb1 <KEYPOS> = $ 0, 7 $ | |
181 input: LeftThumb2 <KEYPOS> = $ 1, 7 $ | |
182 input: LeftThumb3 <KEYPOS> = $ 2, 7 $ | |
183 input: LeftThumb4 <KEYPOS> = $ 3, 7 $ | |
184 | |
185 input: RightThumb1 <KEYPOS> = $ 3, 8 $ | |
186 input: RightThumb2 <KEYPOS> = $ 2, 8 $ | |
187 input: RightThumb3 <KEYPOS> = $ 1, 8 $ | |
188 input: RightThumb4 <KEYPOS> = $ 0, 8 $ | |
189 | |
190 input: Special1 <KEYPOS> = $ 2, 9 $ | |
191 input: Special2 <KEYPOS> = $ 0, 9 $ | |
192 input: Special3 <KEYPOS> = $ 0, 6 $ | |
193 input: Special4 <KEYPOS> = $ 1, 6 $ | |
194 input: Special5 <KEYPOS> = $ 2, 6 $ | |
195 input: Special6 <KEYPOS> = $ 1, 9 $ | |
196 | |
197 % Key alias for keys on Norman layout | |
198 % | |
199 input: NG_Key_E <KEYPOS> = $ 2, 3 $ | |
200 input: NG_Key_O <KEYPOS> = $ 2, 13 $ | |
201 input: NG_Key_I <KEYPOS> = $ 2, 12 $ | |
202 input: NG_Key_S <KEYPOS> = $ 2, 2 $ | |
203 | |
204 input: NG_Prog_Key <KEYPOS> = $ 0, 0 $ | |
205 | |
206 %############################################################################### | |
207 % Actions | |
208 %############################################################################### | |
209 | |
210 action: aShiftTab <COMPLEX_KEYCODE> = $ LSHIFT(Key_Tab) $ | |
211 action: leftCTRL_F <COMPLEX_KEYCODE> = $ LCTRL(Key_F) $ | |
212 action: shiftCtrlC <COMPLEX_KEYCODE> = $ LCTRL(LSHIFT(Key_C)) $ | |
213 | |
214 action: doubleTab <USER_FUNCTION> = $ doubleTabCB, NULL $ | |
215 action: repeatLastCommand <USER_FUNCTION> = $ repeatLastCommandCB, NULL $ | |
216 action: ordinarySearch <USER_FUNCTION> = $ ordinarySearchCB, NULL $ | |
217 action: fileSearch <USER_FUNCTION> = $ fileSearchCB, NULL $ | |
218 | |
219 action: umlaut_A <USER_FUNCTION> = $ umlautCB, (void*)Key_A.raw $ | |
220 action: umlaut_O <USER_FUNCTION> = $ umlautCB, (void*)Key_O.raw $ | |
221 action: umlaut_U <USER_FUNCTION> = $ umlautCB, (void*)Key_U.raw $ | |
222 action: umlaut_S <COMPLEX_KEYCODE> = $ RALT(Key_S) $ | |
223 | |
224 action: toggleLEDEffect <COMPLEX_KEYCODE> = $ Key_LEDEffectNext $ | |
225 | |
226 action: reboot <USER_FUNCTION> = $ rebootCB, NULL $ | |
227 | |
228 %############################################################################### | |
229 % Patterns | |
230 %############################################################################### | |
231 | |
232 % A cluster that causes enter (key order arbitrary) | |
233 % | |
234 {LeftThumb3, RightThumb2} : Key_Enter | |
235 | |
236 % Allow to trigger enter with one hand if necessary | |
237 % | |
238 |LeftThumb4|*2 : Key_Enter | |
239 |LeftThumb1|*2 : Key_Enter | |
240 | |
241 % Double tap on the left inner thumb key triggers a user function | |
242 % | |
243 |LeftThumb3|*2 : doubleTab | |
244 | |
245 % A note line with two thumb keys triggers tab | |
246 % | |
247 |LeftThumb3| -> |RightThumb3| : Key_Tab | |
248 | |
249 % Double tap on right inner thumb key | |
250 % | |
251 |RightThumb2|*2 : aShiftTab | |
252 | |
253 % Note line | |
254 % | |
255 |RightThumb2| -> |LeftThumb2| : Key_Delete | |
256 | |
257 % Tap dance | |
258 % | |
259 |Special1|*2 : repeatLastCommand | |
260 | |
261 |Special3|*3 : ordinarySearch@2, fileSearch@3 | |
262 | |
263 |Special4|*2 : leftCTRL_F | |
264 | |
265 |Special5|*2 : Key_F3 | |
266 | |
267 |Special6|*2 : shiftCtrlC | |
268 | |
269 |NG_Prog_Key|*5 : toggleLEDEffect@2, reboot@5 | |
270 | |
271 % Assign german umlauts as tripple taps to | |
272 % suitable and non-colliding (digraphs!) keys of the home row | |
273 % | |
274 % Occurence probabilities of umlauts in written german: | |
275 % | |
276 % a-umlaut 0,54% | |
277 % o-umlaut 0,30% | |
278 % u-umlaut 0,65% | |
279 % s-umlaut 0,37% | |
280 % | |
281 % These are used together with the EURKEY keyboard layout | |
282 % that is available on Linux and Windows | |
283 % | |
284 % TODO: Disable the following on layers higher than 0 | |
285 % | |
286 |NG_Key_E|*3 : umlaut_A | |
287 |NG_Key_O|*3 : umlaut_O | |
288 |NG_Key_I|*3 : umlaut_U | |
289 |NG_Key_S|*3 : umlaut_S | |
290 | |
*/ | |
//############################################################################## | |
// Tree | |
//############################################################################## | |
// Token_1() [0] | |
// Cluster_2(LeftThumb3, RightThumb2, ) [0] : Key_Enter | |
// Note_3(LeftThumb4) [0] | |
// Note_4(LeftThumb4) [0] : Key_Enter | |
// Note_5(LeftThumb1) [0] | |
// Note_6(LeftThumb1) [0] : Key_Enter | |
// Note_7(LeftThumb3) [0] | |
// Note_8(LeftThumb3) [0] : doubleTab | |
// Note_9(RightThumb3) [0] : Key_Tab | |
// Note_10(RightThumb2) [0] | |
// Note_11(RightThumb2) [0] : aShiftTab | |
// Note_12(LeftThumb2) [0] : Key_Delete | |
// Note_13(Special1) [0] | |
// Note_14(Special1) [0] : repeatLastCommand | |
// Note_15(Special3) [0] | |
// Note_16(Special3) [0] : ordinarySearch | |
// Note_17(Special3) [0] : fileSearch | |
// Note_18(Special4) [0] | |
// Note_19(Special4) [0] : leftCTRL_F | |
// Note_20(Special5) [0] | |
// Note_21(Special5) [0] : Key_F3 | |
// Note_22(Special6) [0] | |
// Note_23(Special6) [0] : shiftCtrlC | |
// Note_24(NG_Prog_Key) [0] | |
// Note_25(NG_Prog_Key) [0] : toggleLEDEffect | |
// Note_26(NG_Prog_Key) [0] | |
// Note_27(NG_Prog_Key) [0] | |
// Note_28(NG_Prog_Key) [0] : reboot | |
// Note_29(NG_Key_E) [0] | |
// Note_30(NG_Key_E) [0] | |
// Note_31(NG_Key_E) [0] : umlaut_A | |
// Note_32(NG_Key_O) [0] | |
// Note_33(NG_Key_O) [0] | |
// Note_34(NG_Key_O) [0] : umlaut_O | |
// Note_35(NG_Key_I) [0] | |
// Note_36(NG_Key_I) [0] | |
// Note_37(NG_Key_I) [0] : umlaut_U | |
// Note_38(NG_Key_S) [0] | |
// Note_39(NG_Key_S) [0] | |
// Note_40(NG_Key_S) [0] : umlaut_S | |
//############################################################################## | |
// Unused Inputs | |
//############################################################################## | |
// Input type 'KEYPOS': RightThumb1, RightThumb4, Special2, | |
//############################################################################## | |
// Unused Actions | |
//############################################################################## | |
// Action type 'KEYCODE': Key_0, Key_1, Key_2, Key_3, Key_4, Key_5, Key_6, Key_7, Key_8, Key_9, Key_A, Key_Again, Key_AlternateErase, Key_B, Key_Backslash, Key_Backspace, Key_Backtick, Key_C, Key_Cancel, Key_CapsLock, Key_Clear, Key_ClearSlashAgain, Key_Comma, Key_Copy, Key_CrselSlashProps, Key_CurrencySubunit, Key_CurrencyUnit, Key_Cut, Key_D, Key_DecimalSeparator, Key_DownArrow, Key_E, Key_End, Key_Equals, Key_ErrorRollover, Key_ErrorUndefined, Key_Escape, Key_Execute, Key_Exsel, Key_F, Key_F1, Key_F10, Key_F11, Key_F12, Key_F13, Key_F14, Key_F15, Key_F16, Key_F17, Key_F18, Key_F19, Key_F2, Key_F20, Key_F21, Key_F22, Key_F23, Key_F24, Key_F4, Key_F5, Key_F6, Key_F7, Key_F8, Key_F9, Key_Find, Key_G, Key_H, Key_Help, Key_Home, Key_I, Key_Insert, Key_International1, Key_International2, Key_International3, Key_International4, Key_International5, Key_International6, Key_International7, Key_International8, Key_International9, Key_J, Key_K, Key_Keypad0, Key_Keypad00, Key_Keypad000, Key_Keypad1, Key_Keypad2, Key_Keypad3, Key_Keypad4, Key_Keypad5, Key_Keypad6, Key_Keypad7, Key_Keypad8, Key_Keypad9, Key_KeypadA, Key_KeypadAdd, Key_KeypadAmpersand, Key_KeypadAtSign, Key_KeypadB, Key_KeypadBackspace, Key_KeypadBinary, Key_KeypadC, Key_KeypadCarat, Key_KeypadClear, Key_KeypadClearEntry, Key_KeypadColon, Key_KeypadComma, Key_KeypadD, Key_KeypadDecimal, Key_KeypadDivide, Key_KeypadDot, Key_KeypadDoubleampersand, Key_KeypadDoublepipe, Key_KeypadE, Key_KeypadEnter, Key_KeypadEqualSign, Key_KeypadEquals, Key_KeypadExclamationPoint, Key_KeypadF, Key_KeypadGreaterThan, Key_KeypadHexadecimal, Key_KeypadLeftCurlyBrace, Key_KeypadLeftParen, Key_KeypadLessThan, Key_KeypadMemoryAdd, Key_KeypadMemoryClear, Key_KeypadMemoryDivide, Key_KeypadMemoryMultiply, Key_KeypadMemoryRecall, Key_KeypadMemoryStore, Key_KeypadMemorySubtract, Key_KeypadMultiply, Key_KeypadNumLock, Key_KeypadOctal, Key_KeypadPercent, Key_KeypadPipe, Key_KeypadPlusSlashMinus, Key_KeypadPoundSign, Key_KeypadRightCurlyBrace, Key_KeypadRightParen, Key_KeypadSpace, Key_KeypadSubtract, Key_KeypadTab, Key_KeypadXor, Key_L, Key_Lang1, Key_Lang2, Key_Lang3, Key_Lang4, Key_Lang5, Key_Lang6, Key_Lang7, Key_Lang8, Key_Lang9, Key_LeftAlt, Key_LeftArrow, Key_LeftBracket, Key_LeftControl, Key_LeftGui, Key_LeftShift, Key_LockingCapsLock, Key_LockingNumLock, Key_LockingScrollLock, Key_M, Key_Menu, Key_Minus, Key_Mute, Key_N, Key_NoEvent, Key_NonUsBackslashAndPipe, Key_NonUsPound, Key_O, Key_Oper, Key_Out, Key_P, Key_PageDown, Key_PageUp, Key_Paste, Key_Pause, Key_PcApplication, Key_Period, Key_PostFail, Key_Power, Key_PrintScreen, Key_Prior, Key_Q, Key_Quote, Key_R, Key_Return, Key_RightAlt, Key_RightArrow, Key_RightBracket, Key_RightControl, Key_RightGui, Key_RightShift, Key_S, Key_ScrollLock, Key_Select, Key_Semicolon, Key_Separator, Key_Slash, Key_Spacebar, Key_Stop, Key_Sysreq, Key_T, Key_ThousandsSeparator, Key_U, Key_Undo, Key_UpArrow, Key_V, Key_VolumeDown, Key_VolumeUp, Key_W, Key_X, Key_Y, Key_Z, | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
#include "detail/ppg_context_detail.h" | |
#include "detail/ppg_token_detail.h" | |
#include "detail/ppg_note_detail.h" | |
#include "detail/ppg_chord_detail.h" | |
#include "detail/ppg_cluster_detail.h" | |
#include "detail/ppg_time_detail.h" | |
#include "detail/ppg_sequence_detail.h" | |
#include "ppg_input.h" | |
#include "ppg_action_flags.h" | |
#ifdef __cplusplus | |
} // end extern "C" | |
#endif | |
#include "Kaleidoscope/Papageno.h" | |
#ifdef PAPAGENO_PREAMBLE_HEADER | |
#include PAPAGENO_PREAMBLE_HEADER | |
#endif | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
// C++ does not support designated initializers | |
// | |
#ifdef __cplusplus | |
# define __GLS_DI__(NAME) | |
# define GLS_ZERO_INIT {} | |
#else | |
# define __GLS_DI__(NAME) .NAME = | |
# define GLS_ZERO_INIT { 0 } | |
#endif | |
#define GLS_ACTION_ZERO_INIT { GLS_ZERO_INIT } | |
#define GLS_INPUT_ZERO_INIT 0 | |
#define GLS_EMPTY() | |
#define GLS_DEFER(...) __VA_ARGS__ GLS_EMPTY() | |
#ifndef GLS_NUM_BITS_LEFT | |
#define GLS_NUM_BITS_LEFT(N_BITS) \ | |
(N_BITS%(8*sizeof(PPG_Bitfield_Storage_Type))) | |
#endif | |
#ifndef GLS_NUM_BYTES | |
#define GLS_NUM_BYTES(N_BITS) \ | |
(N_BITS/(8*sizeof(PPG_Bitfield_Storage_Type))) | |
#endif | |
#ifndef GLS_INITIAL_ABORT_TRIGGER_INPUT | |
#define GLS_INITIAL_ABORT_TRIGGER_INPUT (PPG_Input_Id)((uintptr_t)-1) | |
#endif | |
#ifndef GLS_INITIAL_EVENT_PROCESSOR | |
#define GLS_INITIAL_EVENT_PROCESSOR NULL | |
#endif | |
#ifndef GLS_INITIAL_EVENT_TIMEOUT | |
#define GLS_INITIAL_EVENT_TIMEOUT 200 | |
#endif | |
#ifndef GLS_INITIAL_LAYER | |
#define GLS_INITIAL_LAYER 0 | |
#endif | |
#ifndef GLS_INITIAL_LOGGING | |
#define GLS_INITIAL_LOGGING false | |
#endif | |
#ifndef GLS_INITIAL_LOGGING_ENABLED | |
#define GLS_INITIAL_LOGGING_ENABLED true | |
#endif | |
#ifndef GLS_INITIAL_PAPAGENO_ENABLED | |
#define GLS_INITIAL_PAPAGENO_ENABLED true | |
#endif | |
#ifndef GLS_INITIAL_SIGNAL_CALLBACK_FUNC | |
#define GLS_INITIAL_SIGNAL_CALLBACK_FUNC NULL | |
#endif | |
#ifndef GLS_INITIAL_SIGNAL_CALLBACK_USER_DATA | |
#define GLS_INITIAL_SIGNAL_CALLBACK_USER_DATA NULL | |
#endif | |
#ifndef GLS_INITIAL_TIME_COMPARISON_FUNCTION | |
#define GLS_INITIAL_TIME_COMPARISON_FUNCTION ppg_default_time_comparison | |
#endif | |
#ifndef GLS_INITIAL_TIME_DIFFERENCE_FUNCTION | |
#define GLS_INITIAL_TIME_DIFFERENCE_FUNCTION ppg_default_time_difference | |
#endif | |
#ifndef GLS_INITIAL_TIME_FUNCTION | |
#define GLS_INITIAL_TIME_FUNCTION ppg_default_time | |
#endif | |
#ifndef GLS_INITIAL_TIMEOUT_ENABLED | |
#define GLS_INITIAL_TIMEOUT_ENABLED true | |
#endif | |
#ifndef GLS_EVENT_QUEUE_SIZE | |
#define GLS_EVENT_QUEUE_SIZE(S) (S) | |
#endif | |
//############################################################################## | |
// Actions | |
//############################################################################## | |
// Add a flag to enable local initialization for | |
// all input classes. | |
// | |
#ifdef GLS_ENABLE_ACTIONS_LOCAL_INITIALIZATION_ALL | |
// A flag to toggle specific initialization for type class 'COMPLEX_KEYCODE'. | |
// | |
# ifndef GLS_ENABLE_ACTIONS_LOCAL_INITIALIZATION___COMPLEX_KEYCODE | |
# define GLS_ENABLE_ACTIONS_LOCAL_INITIALIZATION___COMPLEX_KEYCODE | |
# endif | |
// A flag to toggle specific initialization for type class 'KEYCODE'. | |
// | |
# ifndef GLS_ENABLE_ACTIONS_LOCAL_INITIALIZATION___KEYCODE | |
# define GLS_ENABLE_ACTIONS_LOCAL_INITIALIZATION___KEYCODE | |
# endif | |
// A flag to toggle specific initialization for type class 'KEYPOS'. | |
// | |
# ifndef GLS_ENABLE_ACTIONS_LOCAL_INITIALIZATION___KEYPOS | |
# define GLS_ENABLE_ACTIONS_LOCAL_INITIALIZATION___KEYPOS | |
# endif | |
// A flag to toggle specific initialization for type class 'USER_FUNCTION'. | |
// | |
# ifndef GLS_ENABLE_ACTIONS_LOCAL_INITIALIZATION___USER_FUNCTION | |
# define GLS_ENABLE_ACTIONS_LOCAL_INITIALIZATION___USER_FUNCTION | |
# endif | |
#endif | |
// Enable the same type of initialization for all type classes | |
// | |
#ifndef GLS_ACTION_INITIALIZE | |
# define GLS_ACTION_INITIALIZE(UNIQUE_ID, USER_ID, ...) __VA_ARGS__ | |
#endif | |
// Distinguish between global and local | |
// initialization by type class. | |
// | |
// If no class wise initialization is desired | |
// we fall back to the common initialization method | |
// | |
// Action type 'COMPLEX_KEYCODE'. | |
#ifndef GLS_ACTION_INITIALIZE___COMPLEX_KEYCODE | |
# define GLS_ACTION_INITIALIZE___COMPLEX_KEYCODE(UNIQUE_ID, USER_ID, ...) \ | |
GLS_ACTION_INITIALIZE(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__) | |
#endif | |
#ifdef GLS_ENABLE_ACTIONS_LOCAL_INITIALIZATION___COMPLEX_KEYCODE | |
# ifndef GLS_ACTION_INITIALIZE_LOCAL___COMPLEX_KEYCODE | |
# define GLS_ACTION_INITIALIZE_LOCAL___COMPLEX_KEYCODE(UNIQUE_ID, USER_ID, PATH, ...) \ | |
PATH = GLS_ACTION_INITIALIZE___COMPLEX_KEYCODE(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__); | |
# endif | |
# ifndef GLS_ACTION_INITIALIZE_GLOBAL___COMPLEX_KEYCODE | |
# define GLS_ACTION_INITIALIZE_GLOBAL___COMPLEX_KEYCODE(UNIQUE_ID, USER_ID, ...) GLS_ACTION_ZERO_INIT | |
# endif | |
#else | |
# ifndef GLS_ACTION_INITIALIZE_LOCAL___COMPLEX_KEYCODE | |
# define GLS_ACTION_INITIALIZE_LOCAL___COMPLEX_KEYCODE(UNIQUE_ID, USER_ID, PATH, ...) | |
# endif | |
# ifndef GLS_ACTION_INITIALIZE_GLOBAL___COMPLEX_KEYCODE | |
# define GLS_ACTION_INITIALIZE_GLOBAL___COMPLEX_KEYCODE(UNIQUE_ID, USER_ID, ...) \ | |
GLS_ACTION_INITIALIZE___COMPLEX_KEYCODE(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__) | |
# endif | |
#endif | |
// Define a common entry for each type class to be used for | |
// local initialization. | |
// | |
#define GLS_ACTIONS_INITIALIZE_LOCAL_ALL___COMPLEX_KEYCODE \ | |
GLS_ACTION_INITIALIZE_LOCAL___COMPLEX_KEYCODE(219, GLS_DEFER(aShiftTab), Note_11.super.action, LSHIFT(Key_Tab)) \ | |
GLS_ACTION_INITIALIZE_LOCAL___COMPLEX_KEYCODE(220, GLS_DEFER(leftCTRL_F), Note_19.super.action, LCTRL(Key_F)) \ | |
GLS_ACTION_INITIALIZE_LOCAL___COMPLEX_KEYCODE(221, GLS_DEFER(shiftCtrlC), Note_23.super.action, LCTRL(LSHIFT(Key_C))) \ | |
GLS_ACTION_INITIALIZE_LOCAL___COMPLEX_KEYCODE(230, GLS_DEFER(toggleLEDEffect), Note_25.super.action, Key_LEDEffectNext) \ | |
GLS_ACTION_INITIALIZE_LOCAL___COMPLEX_KEYCODE(229, GLS_DEFER(umlaut_S), Note_40.super.action, RALT(Key_S)) \ | |
// Action type 'KEYCODE'. | |
#ifndef GLS_ACTION_INITIALIZE___KEYCODE | |
# define GLS_ACTION_INITIALIZE___KEYCODE(UNIQUE_ID, USER_ID, ...) \ | |
GLS_ACTION_INITIALIZE(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__) | |
#endif | |
#ifdef GLS_ENABLE_ACTIONS_LOCAL_INITIALIZATION___KEYCODE | |
# ifndef GLS_ACTION_INITIALIZE_LOCAL___KEYCODE | |
# define GLS_ACTION_INITIALIZE_LOCAL___KEYCODE(UNIQUE_ID, USER_ID, PATH, ...) \ | |
PATH = GLS_ACTION_INITIALIZE___KEYCODE(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__); | |
# endif | |
# ifndef GLS_ACTION_INITIALIZE_GLOBAL___KEYCODE | |
# define GLS_ACTION_INITIALIZE_GLOBAL___KEYCODE(UNIQUE_ID, USER_ID, ...) GLS_ACTION_ZERO_INIT | |
# endif | |
#else | |
# ifndef GLS_ACTION_INITIALIZE_LOCAL___KEYCODE | |
# define GLS_ACTION_INITIALIZE_LOCAL___KEYCODE(UNIQUE_ID, USER_ID, PATH, ...) | |
# endif | |
# ifndef GLS_ACTION_INITIALIZE_GLOBAL___KEYCODE | |
# define GLS_ACTION_INITIALIZE_GLOBAL___KEYCODE(UNIQUE_ID, USER_ID, ...) \ | |
GLS_ACTION_INITIALIZE___KEYCODE(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__) | |
# endif | |
#endif | |
// Define a common entry for each type class to be used for | |
// local initialization. | |
// | |
#define GLS_ACTIONS_INITIALIZE_LOCAL_ALL___KEYCODE \ | |
GLS_ACTION_INITIALIZE_LOCAL___KEYCODE(40, GLS_DEFER(Key_Enter), Cluster_2.aggregate.super.action) \ | |
GLS_ACTION_INITIALIZE_LOCAL___KEYCODE(40, GLS_DEFER(Key_Enter), Note_4.super.action) \ | |
GLS_ACTION_INITIALIZE_LOCAL___KEYCODE(40, GLS_DEFER(Key_Enter), Note_6.super.action) \ | |
GLS_ACTION_INITIALIZE_LOCAL___KEYCODE(43, GLS_DEFER(Key_Tab), Note_9.super.action) \ | |
GLS_ACTION_INITIALIZE_LOCAL___KEYCODE(76, GLS_DEFER(Key_Delete), Note_12.super.action) \ | |
GLS_ACTION_INITIALIZE_LOCAL___KEYCODE(60, GLS_DEFER(Key_F3), Note_21.super.action) \ | |
// Action type 'KEYPOS'. | |
#ifndef GLS_ACTION_INITIALIZE___KEYPOS | |
# define GLS_ACTION_INITIALIZE___KEYPOS(UNIQUE_ID, USER_ID, ...) \ | |
GLS_ACTION_INITIALIZE(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__) | |
#endif | |
#ifdef GLS_ENABLE_ACTIONS_LOCAL_INITIALIZATION___KEYPOS | |
# ifndef GLS_ACTION_INITIALIZE_LOCAL___KEYPOS | |
# define GLS_ACTION_INITIALIZE_LOCAL___KEYPOS(UNIQUE_ID, USER_ID, PATH, ...) \ | |
PATH = GLS_ACTION_INITIALIZE___KEYPOS(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__); | |
# endif | |
# ifndef GLS_ACTION_INITIALIZE_GLOBAL___KEYPOS | |
# define GLS_ACTION_INITIALIZE_GLOBAL___KEYPOS(UNIQUE_ID, USER_ID, ...) GLS_ACTION_ZERO_INIT | |
# endif | |
#else | |
# ifndef GLS_ACTION_INITIALIZE_LOCAL___KEYPOS | |
# define GLS_ACTION_INITIALIZE_LOCAL___KEYPOS(UNIQUE_ID, USER_ID, PATH, ...) | |
# endif | |
# ifndef GLS_ACTION_INITIALIZE_GLOBAL___KEYPOS | |
# define GLS_ACTION_INITIALIZE_GLOBAL___KEYPOS(UNIQUE_ID, USER_ID, ...) \ | |
GLS_ACTION_INITIALIZE___KEYPOS(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__) | |
# endif | |
#endif | |
// Define a common entry for each type class to be used for | |
// local initialization. | |
// | |
#define GLS_ACTIONS_INITIALIZE_LOCAL_ALL___KEYPOS \ | |
// Action type 'USER_FUNCTION'. | |
#ifndef GLS_ACTION_INITIALIZE___USER_FUNCTION | |
# define GLS_ACTION_INITIALIZE___USER_FUNCTION(UNIQUE_ID, USER_ID, ...) \ | |
GLS_ACTION_INITIALIZE(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__) | |
#endif | |
#ifdef GLS_ENABLE_ACTIONS_LOCAL_INITIALIZATION___USER_FUNCTION | |
# ifndef GLS_ACTION_INITIALIZE_LOCAL___USER_FUNCTION | |
# define GLS_ACTION_INITIALIZE_LOCAL___USER_FUNCTION(UNIQUE_ID, USER_ID, PATH, ...) \ | |
PATH = GLS_ACTION_INITIALIZE___USER_FUNCTION(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__); | |
# endif | |
# ifndef GLS_ACTION_INITIALIZE_GLOBAL___USER_FUNCTION | |
# define GLS_ACTION_INITIALIZE_GLOBAL___USER_FUNCTION(UNIQUE_ID, USER_ID, ...) GLS_ACTION_ZERO_INIT | |
# endif | |
#else | |
# ifndef GLS_ACTION_INITIALIZE_LOCAL___USER_FUNCTION | |
# define GLS_ACTION_INITIALIZE_LOCAL___USER_FUNCTION(UNIQUE_ID, USER_ID, PATH, ...) | |
# endif | |
# ifndef GLS_ACTION_INITIALIZE_GLOBAL___USER_FUNCTION | |
# define GLS_ACTION_INITIALIZE_GLOBAL___USER_FUNCTION(UNIQUE_ID, USER_ID, ...) \ | |
GLS_ACTION_INITIALIZE___USER_FUNCTION(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__) | |
# endif | |
#endif | |
// Define a common entry for each type class to be used for | |
// local initialization. | |
// | |
#define GLS_ACTIONS_INITIALIZE_LOCAL_ALL___USER_FUNCTION \ | |
GLS_ACTION_INITIALIZE_LOCAL___USER_FUNCTION(222, GLS_DEFER(doubleTab), Note_8.super.action, doubleTabCB,NULL) \ | |
GLS_ACTION_INITIALIZE_LOCAL___USER_FUNCTION(223, GLS_DEFER(repeatLastCommand), Note_14.super.action, repeatLastCommandCB,NULL) \ | |
GLS_ACTION_INITIALIZE_LOCAL___USER_FUNCTION(224, GLS_DEFER(ordinarySearch), Note_16.super.action, ordinarySearchCB,NULL) \ | |
GLS_ACTION_INITIALIZE_LOCAL___USER_FUNCTION(225, GLS_DEFER(fileSearch), Note_17.super.action, fileSearchCB,NULL) \ | |
GLS_ACTION_INITIALIZE_LOCAL___USER_FUNCTION(231, GLS_DEFER(reboot), Note_28.super.action, rebootCB,NULL) \ | |
GLS_ACTION_INITIALIZE_LOCAL___USER_FUNCTION(226, GLS_DEFER(umlaut_A), Note_31.super.action, umlautCB,(void*)Key_A.raw) \ | |
GLS_ACTION_INITIALIZE_LOCAL___USER_FUNCTION(227, GLS_DEFER(umlaut_O), Note_34.super.action, umlautCB,(void*)Key_O.raw) \ | |
GLS_ACTION_INITIALIZE_LOCAL___USER_FUNCTION(228, GLS_DEFER(umlaut_U), Note_37.super.action, umlautCB,(void*)Key_U.raw) \ | |
// Define a common entry point for local initialization | |
// | |
#define GLS_ACTIONS_INITIALIZE_LOCAL_ALL \ | |
GLS_ACTIONS_INITIALIZE_LOCAL_ALL___COMPLEX_KEYCODE \ | |
GLS_ACTIONS_INITIALIZE_LOCAL_ALL___KEYCODE \ | |
GLS_ACTIONS_INITIALIZE_LOCAL_ALL___KEYPOS \ | |
GLS_ACTIONS_INITIALIZE_LOCAL_ALL___USER_FUNCTION \ | |
// This macro can be used to add configuration of actions at global scope. | |
// The default is no configuration at global scope. | |
// | |
#ifndef GLS_ACTION_CONFIGURE_GLOBAL | |
# define GLS_ACTION_CONFIGURE_GLOBAL(...) | |
#endif | |
// This macro can be used to add configuration of actions at global scope. | |
// The default is no configuration at local scope. | |
// | |
#ifndef GLS_ACTION_CONFIGURE_LOCAL | |
# define GLS_ACTION_CONFIGURE_LOCAL(...) | |
#endif | |
// Implement the following macro to enable specific initialization | |
// at global scope for type class 'COMPLEX_KEYCODE'. | |
// | |
#ifndef GLS_ACTION_CONFIGURE_GLOBAL___COMPLEX_KEYCODE | |
# define GLS_ACTION_CONFIGURE_GLOBAL___COMPLEX_KEYCODE(...) \ | |
GLS_ACTION_CONFIGURE_GLOBAL(GLS_DEFER(__VA_ARGS__)) | |
#endif | |
// Implement the following macro to enable specific initialization | |
// at local scope for type class COMPLEX_KEYCODE. | |
// | |
#ifndef GLS_ACTION_CONFIGURE_LOCAL___COMPLEX_KEYCODE | |
# define GLS_ACTION_CONFIGURE_LOCAL___COMPLEX_KEYCODE(...) \ | |
GLS_ACTION_CONFIGURE_LOCAL(GLS_DEFER(__VA_ARGS__)) | |
#endif | |
// Use this macro to perform specific initializations of actions with | |
// type class 'COMPLEX_KEYCODE'. | |
// | |
#define GLS_ACTIONS___COMPLEX_KEYCODE(OP) \ | |
OP(219, aShiftTab, LSHIFT(Key_Tab))\ | |
OP(220, leftCTRL_F, LCTRL(Key_F))\ | |
OP(221, shiftCtrlC, LCTRL(LSHIFT(Key_C)))\ | |
OP(230, toggleLEDEffect, Key_LEDEffectNext)\ | |
OP(229, umlaut_S, RALT(Key_S))\ | |
// Implement the following macro to enable specific initialization | |
// at global scope for type class 'KEYCODE'. | |
// | |
#ifndef GLS_ACTION_CONFIGURE_GLOBAL___KEYCODE | |
# define GLS_ACTION_CONFIGURE_GLOBAL___KEYCODE(...) \ | |
GLS_ACTION_CONFIGURE_GLOBAL(GLS_DEFER(__VA_ARGS__)) | |
#endif | |
// Implement the following macro to enable specific initialization | |
// at local scope for type class KEYCODE. | |
// | |
#ifndef GLS_ACTION_CONFIGURE_LOCAL___KEYCODE | |
# define GLS_ACTION_CONFIGURE_LOCAL___KEYCODE(...) \ | |
GLS_ACTION_CONFIGURE_LOCAL(GLS_DEFER(__VA_ARGS__)) | |
#endif | |
// Use this macro to perform specific initializations of actions with | |
// type class 'KEYCODE'. | |
// | |
#define GLS_ACTIONS___KEYCODE(OP) \ | |
OP(76, Key_Delete)\ | |
OP(40, Key_Enter)\ | |
OP(60, Key_F3)\ | |
OP(43, Key_Tab)\ | |
// Implement the following macro to enable specific initialization | |
// at global scope for type class 'KEYPOS'. | |
// | |
#ifndef GLS_ACTION_CONFIGURE_GLOBAL___KEYPOS | |
# define GLS_ACTION_CONFIGURE_GLOBAL___KEYPOS(...) \ | |
GLS_ACTION_CONFIGURE_GLOBAL(GLS_DEFER(__VA_ARGS__)) | |
#endif | |
// Implement the following macro to enable specific initialization | |
// at local scope for type class KEYPOS. | |
// | |
#ifndef GLS_ACTION_CONFIGURE_LOCAL___KEYPOS | |
# define GLS_ACTION_CONFIGURE_LOCAL___KEYPOS(...) \ | |
GLS_ACTION_CONFIGURE_LOCAL(GLS_DEFER(__VA_ARGS__)) | |
#endif | |
// Use this macro to perform specific initializations of actions with | |
// type class 'KEYPOS'. | |
// | |
#define GLS_ACTIONS___KEYPOS(OP) \ | |
// Implement the following macro to enable specific initialization | |
// at global scope for type class 'USER_FUNCTION'. | |
// | |
#ifndef GLS_ACTION_CONFIGURE_GLOBAL___USER_FUNCTION | |
# define GLS_ACTION_CONFIGURE_GLOBAL___USER_FUNCTION(...) \ | |
GLS_ACTION_CONFIGURE_GLOBAL(GLS_DEFER(__VA_ARGS__)) | |
#endif | |
// Implement the following macro to enable specific initialization | |
// at local scope for type class USER_FUNCTION. | |
// | |
#ifndef GLS_ACTION_CONFIGURE_LOCAL___USER_FUNCTION | |
# define GLS_ACTION_CONFIGURE_LOCAL___USER_FUNCTION(...) \ | |
GLS_ACTION_CONFIGURE_LOCAL(GLS_DEFER(__VA_ARGS__)) | |
#endif | |
// Use this macro to perform specific initializations of actions with | |
// type class 'USER_FUNCTION'. | |
// | |
#define GLS_ACTIONS___USER_FUNCTION(OP) \ | |
OP(222, doubleTab, doubleTabCB,NULL)\ | |
OP(225, fileSearch, fileSearchCB,NULL)\ | |
OP(224, ordinarySearch, ordinarySearchCB,NULL)\ | |
OP(231, reboot, rebootCB,NULL)\ | |
OP(223, repeatLastCommand, repeatLastCommandCB,NULL)\ | |
OP(226, umlaut_A, umlautCB,(void*)Key_A.raw)\ | |
OP(227, umlaut_O, umlautCB,(void*)Key_O.raw)\ | |
OP(228, umlaut_U, umlautCB,(void*)Key_U.raw)\ | |
#define GLS_ACTIONS_ALL(OP) \ | |
GLS_ACTIONS___COMPLEX_KEYCODE(OP) \ | |
GLS_ACTIONS___KEYCODE(OP) \ | |
GLS_ACTIONS___KEYPOS(OP) \ | |
GLS_ACTIONS___USER_FUNCTION(OP) \ | |
#define GLS_ACTIONS_CONFIGURE_LOCAL_ALL \ | |
GLS_ACTIONS___COMPLEX_KEYCODE(GLS_ACTION_CONFIGURE_LOCAL___COMPLEX_KEYCODE) \ | |
GLS_ACTIONS___KEYCODE(GLS_ACTION_CONFIGURE_LOCAL___KEYCODE) \ | |
GLS_ACTIONS___KEYPOS(GLS_ACTION_CONFIGURE_LOCAL___KEYPOS) \ | |
GLS_ACTIONS___USER_FUNCTION(GLS_ACTION_CONFIGURE_LOCAL___USER_FUNCTION) \ | |
//############################################################################## | |
// Inputs | |
//############################################################################## | |
// Add a flag to enable local initialization for | |
// all input classes. | |
// | |
#ifdef GLS_ENABLE_INPUTS_LOCAL_INITIALIZATION_ALL | |
// A flag to toggle specific initialization for type class 'KEYPOS'. | |
// | |
# ifndef GLS_ENABLE_INPUTS_LOCAL_INITIALIZATION___KEYPOS | |
# define GLS_ENABLE_INPUTS_LOCAL_INITIALIZATION___KEYPOS | |
# endif | |
#endif | |
// Enable the same type of initialization for all type classes | |
// | |
#ifndef GLS_INPUT_INITIALIZE | |
# define GLS_INPUT_INITIALIZE(UNIQUE_ID, USER_ID, ...) __VA_ARGS__ | |
#endif | |
// Distinguish between global and local | |
// initialization by type class. | |
// | |
// If no class wise initialization is desired | |
// we fall back to the common initialization method | |
// | |
// Input type 'KEYPOS'. | |
#ifndef GLS_INPUT_INITIALIZE___KEYPOS | |
# define GLS_INPUT_INITIALIZE___KEYPOS(UNIQUE_ID, USER_ID, ...) \ | |
GLS_INPUT_INITIALIZE(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__) | |
#endif | |
#ifdef GLS_ENABLE_INPUTS_LOCAL_INITIALIZATION___KEYPOS | |
# ifndef GLS_INPUT_INITIALIZE_LOCAL___KEYPOS | |
# define GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(UNIQUE_ID, USER_ID, PATH, ...) \ | |
PATH = GLS_INPUT_INITIALIZE___KEYPOS(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__); | |
# endif | |
# ifndef GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS | |
# define GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(UNIQUE_ID, USER_ID, ...) GLS_INPUT_ZERO_INIT | |
# endif | |
#else | |
# ifndef GLS_INPUT_INITIALIZE_LOCAL___KEYPOS | |
# define GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(UNIQUE_ID, USER_ID, PATH, ...) | |
# endif | |
# ifndef GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS | |
# define GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(UNIQUE_ID, USER_ID, ...) \ | |
GLS_INPUT_INITIALIZE___KEYPOS(UNIQUE_ID, GLS_DEFER(USER_ID), ##__VA_ARGS__) | |
# endif | |
#endif | |
// Define a common entry for each type class to be used for | |
// local initialization. | |
// | |
#define GLS_INPUTS_INITIALIZE_LOCAL_ALL___KEYPOS \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(2, GLS_DEFER(LeftThumb3), Cluster_2.aggregate.inputs[0], 2,7) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(5, GLS_DEFER(RightThumb2), Cluster_2.aggregate.inputs[1], 2,8) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(3, GLS_DEFER(LeftThumb4), Note_3.input, 3,7) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(3, GLS_DEFER(LeftThumb4), Note_4.input, 3,7) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(0, GLS_DEFER(LeftThumb1), Note_5.input, 0,7) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(0, GLS_DEFER(LeftThumb1), Note_6.input, 0,7) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(2, GLS_DEFER(LeftThumb3), Note_7.input, 2,7) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(2, GLS_DEFER(LeftThumb3), Note_8.input, 2,7) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(6, GLS_DEFER(RightThumb3), Note_9.input, 1,8) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(5, GLS_DEFER(RightThumb2), Note_10.input, 2,8) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(5, GLS_DEFER(RightThumb2), Note_11.input, 2,8) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(1, GLS_DEFER(LeftThumb2), Note_12.input, 1,7) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(8, GLS_DEFER(Special1), Note_13.input, 2,9) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(8, GLS_DEFER(Special1), Note_14.input, 2,9) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(10, GLS_DEFER(Special3), Note_15.input, 0,6) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(10, GLS_DEFER(Special3), Note_16.input, 0,6) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(10, GLS_DEFER(Special3), Note_17.input, 0,6) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(11, GLS_DEFER(Special4), Note_18.input, 1,6) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(11, GLS_DEFER(Special4), Note_19.input, 1,6) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(12, GLS_DEFER(Special5), Note_20.input, 2,6) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(12, GLS_DEFER(Special5), Note_21.input, 2,6) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(13, GLS_DEFER(Special6), Note_22.input, 1,9) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(13, GLS_DEFER(Special6), Note_23.input, 1,9) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(18, GLS_DEFER(NG_Prog_Key), Note_24.input, 0,0) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(18, GLS_DEFER(NG_Prog_Key), Note_25.input, 0,0) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(18, GLS_DEFER(NG_Prog_Key), Note_26.input, 0,0) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(18, GLS_DEFER(NG_Prog_Key), Note_27.input, 0,0) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(18, GLS_DEFER(NG_Prog_Key), Note_28.input, 0,0) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(14, GLS_DEFER(NG_Key_E), Note_29.input, 2,3) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(14, GLS_DEFER(NG_Key_E), Note_30.input, 2,3) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(14, GLS_DEFER(NG_Key_E), Note_31.input, 2,3) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(15, GLS_DEFER(NG_Key_O), Note_32.input, 2,13) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(15, GLS_DEFER(NG_Key_O), Note_33.input, 2,13) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(15, GLS_DEFER(NG_Key_O), Note_34.input, 2,13) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(16, GLS_DEFER(NG_Key_I), Note_35.input, 2,12) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(16, GLS_DEFER(NG_Key_I), Note_36.input, 2,12) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(16, GLS_DEFER(NG_Key_I), Note_37.input, 2,12) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(17, GLS_DEFER(NG_Key_S), Note_38.input, 2,2) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(17, GLS_DEFER(NG_Key_S), Note_39.input, 2,2) \ | |
GLS_INPUT_INITIALIZE_LOCAL___KEYPOS(17, GLS_DEFER(NG_Key_S), Note_40.input, 2,2) \ | |
// Define a common entry point for local initialization | |
// | |
#define GLS_INPUTS_INITIALIZE_LOCAL_ALL \ | |
GLS_INPUTS_INITIALIZE_LOCAL_ALL___KEYPOS \ | |
// This macro can be used to add configuration of inputs at global scope. | |
// The default is no configuration at global scope. | |
// | |
#ifndef GLS_INPUT_CONFIGURE_GLOBAL | |
# define GLS_INPUT_CONFIGURE_GLOBAL(...) | |
#endif | |
// This macro can be used to add configuration of inputs at global scope. | |
// The default is no configuration at local scope. | |
// | |
#ifndef GLS_INPUT_CONFIGURE_LOCAL | |
# define GLS_INPUT_CONFIGURE_LOCAL(...) | |
#endif | |
// Implement the following macro to enable specific initialization | |
// at global scope for type class 'KEYPOS'. | |
// | |
#ifndef GLS_INPUT_CONFIGURE_GLOBAL___KEYPOS | |
# define GLS_INPUT_CONFIGURE_GLOBAL___KEYPOS(...) \ | |
GLS_INPUT_CONFIGURE_GLOBAL(GLS_DEFER(__VA_ARGS__)) | |
#endif | |
// Implement the following macro to enable specific initialization | |
// at local scope for type class KEYPOS. | |
// | |
#ifndef GLS_INPUT_CONFIGURE_LOCAL___KEYPOS | |
# define GLS_INPUT_CONFIGURE_LOCAL___KEYPOS(...) \ | |
GLS_INPUT_CONFIGURE_LOCAL(GLS_DEFER(__VA_ARGS__)) | |
#endif | |
// Use this macro to perform specific initializations of inputs with | |
// type class 'KEYPOS'. | |
// | |
#define GLS_INPUTS___KEYPOS(OP) \ | |
OP(0, LeftThumb1, 0,7)\ | |
OP(1, LeftThumb2, 1,7)\ | |
OP(2, LeftThumb3, 2,7)\ | |
OP(3, LeftThumb4, 3,7)\ | |
OP(14, NG_Key_E, 2,3)\ | |
OP(16, NG_Key_I, 2,12)\ | |
OP(15, NG_Key_O, 2,13)\ | |
OP(17, NG_Key_S, 2,2)\ | |
OP(18, NG_Prog_Key, 0,0)\ | |
OP(5, RightThumb2, 2,8)\ | |
OP(6, RightThumb3, 1,8)\ | |
OP(8, Special1, 2,9)\ | |
OP(10, Special3, 0,6)\ | |
OP(11, Special4, 1,6)\ | |
OP(12, Special5, 2,6)\ | |
OP(13, Special6, 1,9)\ | |
#define GLS_INPUTS_ALL(OP) \ | |
GLS_INPUTS___KEYPOS(OP) \ | |
#define GLS_INPUTS_CONFIGURE_LOCAL_ALL \ | |
GLS_INPUTS___KEYPOS(GLS_INPUT_CONFIGURE_LOCAL___KEYPOS) \ | |
//############################################################################## | |
// Initialization | |
//############################################################################## | |
#ifdef __cplusplus | |
} // end extern "C" | |
#endif | |
#ifdef GLS_GLOBAL_INITIALIZATION_INCLUDE | |
#include GLS_GLOBAL_INITIALIZATION_INCLUDE | |
#endif | |
#ifndef GLS_GLOBAL_INITIALIZATION | |
#define GLS_GLOBAL_INITIALIZATION | |
#endif | |
GLS_GLOBAL_INITIALIZATION | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
//############################################################################## | |
// Inputs global configuration | |
//############################################################################## | |
// Input type 'KEYPOS' | |
// | |
GLS_INPUTS___KEYPOS(GLS_INPUT_CONFIGURE_GLOBAL___KEYPOS) | |
//############################################################################## | |
// Actions global configuration | |
//############################################################################## | |
// Action type 'COMPLEX_KEYCODE' | |
// | |
GLS_ACTIONS___COMPLEX_KEYCODE(GLS_ACTION_CONFIGURE_GLOBAL___COMPLEX_KEYCODE) | |
// Action type 'KEYCODE' | |
// | |
GLS_ACTIONS___KEYCODE(GLS_ACTION_CONFIGURE_GLOBAL___KEYCODE) | |
// Action type 'USER_FUNCTION' | |
// | |
GLS_ACTIONS___USER_FUNCTION(GLS_ACTION_CONFIGURE_GLOBAL___USER_FUNCTION) | |
//############################################################################## | |
// Token tree forward declarations | |
//############################################################################## | |
extern PPG_Token__ Token_1; | |
extern PPG_Cluster Cluster_2; | |
extern PPG_Note Note_3; | |
extern PPG_Note Note_4; | |
extern PPG_Note Note_5; | |
extern PPG_Note Note_6; | |
extern PPG_Note Note_7; | |
extern PPG_Note Note_8; | |
extern PPG_Note Note_9; | |
extern PPG_Note Note_10; | |
extern PPG_Note Note_11; | |
extern PPG_Note Note_12; | |
extern PPG_Note Note_13; | |
extern PPG_Note Note_14; | |
extern PPG_Note Note_15; | |
extern PPG_Note Note_16; | |
extern PPG_Note Note_17; | |
extern PPG_Note Note_18; | |
extern PPG_Note Note_19; | |
extern PPG_Note Note_20; | |
extern PPG_Note Note_21; | |
extern PPG_Note Note_22; | |
extern PPG_Note Note_23; | |
extern PPG_Note Note_24; | |
extern PPG_Note Note_25; | |
extern PPG_Note Note_26; | |
extern PPG_Note Note_27; | |
extern PPG_Note Note_28; | |
extern PPG_Note Note_29; | |
extern PPG_Note Note_30; | |
extern PPG_Note Note_31; | |
extern PPG_Note Note_32; | |
extern PPG_Note Note_33; | |
extern PPG_Note Note_34; | |
extern PPG_Note Note_35; | |
extern PPG_Note Note_36; | |
extern PPG_Note Note_37; | |
extern PPG_Note Note_38; | |
extern PPG_Note Note_39; | |
extern PPG_Note Note_40; | |
//############################################################################## | |
// Token tree | |
//############################################################################## | |
// (234:1-26) | |
// | |
PPG_Bitfield_Storage_Type Cluster_2_member_active_lasting[(GLS_NUM_BITS_LEFT(2) != 0) ? (GLS_NUM_BYTES(2) + 1) : GLS_NUM_BYTES(2)] | |
= GLS_ZERO_INIT; | |
PPG_Bitfield_Storage_Type Cluster_2_member_active[(GLS_NUM_BITS_LEFT(2) != 0) ? (GLS_NUM_BYTES(2) + 1) : GLS_NUM_BYTES(2)] | |
= GLS_ZERO_INIT; | |
PPG_Input_Id Cluster_2_inputs[2] = { | |
GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(LeftThumb3, 2,7), // LeftThumb3: (182:1-40) | |
GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(RightThumb2, 2,8) // RightThumb2: (186:1-41) | |
}; | |
PPG_Cluster Cluster_2 = { | |
__GLS_DI__(aggregate) { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_cluster_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___KEYCODE(40, Key_Enter), // Key_Enter: (50:1-28) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(n_members) 2, | |
__GLS_DI__(inputs) Cluster_2_inputs, | |
__GLS_DI__(member_active) { | |
__GLS_DI__(bitarray) Cluster_2_member_active, | |
__GLS_DI__(n_bits) 2 | |
}, | |
__GLS_DI__(n_inputs_active) 0 | |
}, | |
__GLS_DI__(member_active_lasting) { | |
__GLS_DI__(bitarray) Cluster_2_member_active_lasting, | |
__GLS_DI__(n_bits) 2 | |
}, | |
__GLS_DI__(n_lasting) 0 | |
}; | |
// (238:1-13) | |
// | |
PPG_Note Note_4 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_3, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___KEYCODE(40, Key_Enter), // Key_Enter: (50:1-28) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(LeftThumb4, 3,7) | |
}; | |
// (238:1-13) | |
// | |
PPG_Token__ *Note_3_children[1] = { | |
(PPG_Token__*)&Note_4 | |
}; | |
PPG_Note Note_3 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) Note_3_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_3_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_3_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(LeftThumb4, 3,7) | |
}; | |
// (239:1-13) | |
// | |
PPG_Note Note_6 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_5, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___KEYCODE(40, Key_Enter), // Key_Enter: (50:1-28) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(LeftThumb1, 0,7) | |
}; | |
// (239:1-13) | |
// | |
PPG_Token__ *Note_5_children[1] = { | |
(PPG_Token__*)&Note_6 | |
}; | |
PPG_Note Note_5 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) Note_5_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_5_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_5_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(LeftThumb1, 0,7) | |
}; | |
// (243:1-13) | |
// | |
PPG_Note Note_8 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_7, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___USER_FUNCTION(222, doubleTab, doubleTabCB,NULL), // doubleTab: (214:1-59) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(LeftThumb3, 2,7) | |
}; | |
// (247:17-30) | |
// | |
PPG_Note Note_9 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_7, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___KEYCODE(43, Key_Tab), // Key_Tab: (53:1-26) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(RightThumb3, 1,8) | |
}; | |
// (243:1-13) | |
// | |
PPG_Token__ *Note_7_children[2] = { | |
(PPG_Token__*)&Note_8, | |
(PPG_Token__*)&Note_9 | |
}; | |
PPG_Note Note_7 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) Note_7_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_7_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_7_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(LeftThumb3, 2,7) | |
}; | |
// (251:1-14) | |
// | |
PPG_Note Note_11 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_10, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___COMPLEX_KEYCODE(219, aShiftTab, LSHIFT(Key_Tab)), // aShiftTab: (210:1-59) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(RightThumb2, 2,8) | |
}; | |
// (255:18-30) | |
// | |
PPG_Note Note_12 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_10, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___KEYCODE(76, Key_Delete), // Key_Delete: (86:1-29) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(LeftThumb2, 1,7) | |
}; | |
// (251:1-14) | |
// | |
PPG_Token__ *Note_10_children[2] = { | |
(PPG_Token__*)&Note_11, | |
(PPG_Token__*)&Note_12 | |
}; | |
PPG_Note Note_10 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) Note_10_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_10_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_10_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(RightThumb2, 2,8) | |
}; | |
// (259:1-11) | |
// | |
PPG_Note Note_14 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_13, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___USER_FUNCTION(223, repeatLastCommand, repeatLastCommandCB,NULL), // repeatLastCommand: (215:1-75) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(Special1, 2,9) | |
}; | |
// (259:1-11) | |
// | |
PPG_Token__ *Note_13_children[1] = { | |
(PPG_Token__*)&Note_14 | |
}; | |
PPG_Note Note_13 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) Note_13_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_13_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_13_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(Special1, 2,9) | |
}; | |
// (261:1-11) | |
// | |
PPG_Note Note_17 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_16, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___USER_FUNCTION(225, fileSearch, fileSearchCB,NULL), // fileSearch: (217:1-61) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(Special3, 0,6) | |
}; | |
// (261:1-11) | |
// | |
PPG_Token__ *Note_16_children[1] = { | |
(PPG_Token__*)&Note_17 | |
}; | |
PPG_Note Note_16 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_15, | |
__GLS_DI__(children) Note_16_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_16_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_16_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___USER_FUNCTION(224, ordinarySearch, ordinarySearchCB,NULL), // ordinarySearch: (216:1-69) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(Special3, 0,6) | |
}; | |
// (261:1-11) | |
// | |
PPG_Token__ *Note_15_children[1] = { | |
(PPG_Token__*)&Note_16 | |
}; | |
PPG_Note Note_15 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) Note_15_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_15_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_15_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(Special3, 0,6) | |
}; | |
// (263:1-11) | |
// | |
PPG_Note Note_19 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_18, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___COMPLEX_KEYCODE(220, leftCTRL_F, LCTRL(Key_F)), // leftCTRL_F: (211:1-57) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(Special4, 1,6) | |
}; | |
// (263:1-11) | |
// | |
PPG_Token__ *Note_18_children[1] = { | |
(PPG_Token__*)&Note_19 | |
}; | |
PPG_Note Note_18 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) Note_18_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_18_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_18_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(Special4, 1,6) | |
}; | |
// (265:1-11) | |
// | |
PPG_Note Note_21 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_20, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___KEYCODE(60, Key_F3), // Key_F3: (70:1-25) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(Special5, 2,6) | |
}; | |
// (265:1-11) | |
// | |
PPG_Token__ *Note_20_children[1] = { | |
(PPG_Token__*)&Note_21 | |
}; | |
PPG_Note Note_20 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) Note_20_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_20_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_20_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(Special5, 2,6) | |
}; | |
// (267:1-11) | |
// | |
PPG_Note Note_23 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_22, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___COMPLEX_KEYCODE(221, shiftCtrlC, LCTRL(LSHIFT(Key_C))), // shiftCtrlC: (212:1-65) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(Special6, 1,9) | |
}; | |
// (267:1-11) | |
// | |
PPG_Token__ *Note_22_children[1] = { | |
(PPG_Token__*)&Note_23 | |
}; | |
PPG_Note Note_22 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) Note_22_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_22_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_22_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(Special6, 1,9) | |
}; | |
// (269:1-14) | |
// | |
PPG_Note Note_28 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_27, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___USER_FUNCTION(231, reboot, rebootCB,NULL), // reboot: (226:1-53) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Prog_Key, 0,0) | |
}; | |
// (269:1-14) | |
// | |
PPG_Token__ *Note_27_children[1] = { | |
(PPG_Token__*)&Note_28 | |
}; | |
PPG_Note Note_27 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_26, | |
__GLS_DI__(children) Note_27_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_27_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_27_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | PPG_Action_Fallback | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Prog_Key, 0,0) | |
}; | |
// (269:1-14) | |
// | |
PPG_Token__ *Note_26_children[1] = { | |
(PPG_Token__*)&Note_27 | |
}; | |
PPG_Note Note_26 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_25, | |
__GLS_DI__(children) Note_26_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_26_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_26_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | PPG_Action_Fallback | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Prog_Key, 0,0) | |
}; | |
// (269:1-14) | |
// | |
PPG_Token__ *Note_25_children[1] = { | |
(PPG_Token__*)&Note_26 | |
}; | |
PPG_Note Note_25 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_24, | |
__GLS_DI__(children) Note_25_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_25_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_25_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___COMPLEX_KEYCODE(230, toggleLEDEffect, Key_LEDEffectNext), // toggleLEDEffect: (224:1-67) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Prog_Key, 0,0) | |
}; | |
// (269:1-14) | |
// | |
PPG_Token__ *Note_24_children[1] = { | |
(PPG_Token__*)&Note_25 | |
}; | |
PPG_Note Note_24 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) Note_24_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_24_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_24_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Prog_Key, 0,0) | |
}; | |
// (286:1-11) | |
// | |
PPG_Note Note_31 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_30, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___USER_FUNCTION(226, umlaut_A, umlautCB,(void*)Key_A.raw), // umlaut_A: (219:1-67) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Key_E, 2,3) | |
}; | |
// (286:1-11) | |
// | |
PPG_Token__ *Note_30_children[1] = { | |
(PPG_Token__*)&Note_31 | |
}; | |
PPG_Note Note_30 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_29, | |
__GLS_DI__(children) Note_30_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_30_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_30_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Key_E, 2,3) | |
}; | |
// (286:1-11) | |
// | |
PPG_Token__ *Note_29_children[1] = { | |
(PPG_Token__*)&Note_30 | |
}; | |
PPG_Note Note_29 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) Note_29_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_29_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_29_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Key_E, 2,3) | |
}; | |
// (287:1-11) | |
// | |
PPG_Note Note_34 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_33, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___USER_FUNCTION(227, umlaut_O, umlautCB,(void*)Key_O.raw), // umlaut_O: (220:1-67) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Key_O, 2,13) | |
}; | |
// (287:1-11) | |
// | |
PPG_Token__ *Note_33_children[1] = { | |
(PPG_Token__*)&Note_34 | |
}; | |
PPG_Note Note_33 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_32, | |
__GLS_DI__(children) Note_33_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_33_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_33_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Key_O, 2,13) | |
}; | |
// (287:1-11) | |
// | |
PPG_Token__ *Note_32_children[1] = { | |
(PPG_Token__*)&Note_33 | |
}; | |
PPG_Note Note_32 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) Note_32_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_32_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_32_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Key_O, 2,13) | |
}; | |
// (288:1-11) | |
// | |
PPG_Note Note_37 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_36, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___USER_FUNCTION(228, umlaut_U, umlautCB,(void*)Key_U.raw), // umlaut_U: (221:1-67) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Key_I, 2,12) | |
}; | |
// (288:1-11) | |
// | |
PPG_Token__ *Note_36_children[1] = { | |
(PPG_Token__*)&Note_37 | |
}; | |
PPG_Note Note_36 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_35, | |
__GLS_DI__(children) Note_36_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_36_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_36_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Key_I, 2,12) | |
}; | |
// (288:1-11) | |
// | |
PPG_Token__ *Note_35_children[1] = { | |
(PPG_Token__*)&Note_36 | |
}; | |
PPG_Note Note_35 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) Note_35_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_35_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_35_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Key_I, 2,12) | |
}; | |
// (289:1-11) | |
// | |
PPG_Note Note_40 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_39, | |
__GLS_DI__(children) NULL, | |
__GLS_DI__(n_allocated_children) 0, | |
__GLS_DI__(n_children) 0, | |
__GLS_DI__(action) GLS_ACTION_INITIALIZE_GLOBAL___COMPLEX_KEYCODE(229, umlaut_S, RALT(Key_S)), // umlaut_S: (222:1-54) | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Key_S, 2,2) | |
}; | |
// (289:1-11) | |
// | |
PPG_Token__ *Note_39_children[1] = { | |
(PPG_Token__*)&Note_40 | |
}; | |
PPG_Note Note_39 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Note_38, | |
__GLS_DI__(children) Note_39_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_39_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_39_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Key_S, 2,2) | |
}; | |
// (289:1-11) | |
// | |
PPG_Token__ *Note_38_children[1] = { | |
(PPG_Token__*)&Note_39 | |
}; | |
PPG_Note Note_38 = { | |
__GLS_DI__(super) { | |
__GLS_DI__(vtable) &ppg_note_vtable, | |
__GLS_DI__(parent) (PPG_Token__*)&Token_1, | |
__GLS_DI__(children) Note_38_children, | |
__GLS_DI__(n_allocated_children) sizeof(Note_38_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Note_38_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0 | PPG_Note_Flags_A_N_D, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}, | |
__GLS_DI__(input) GLS_INPUT_INITIALIZE_GLOBAL___KEYPOS(NG_Key_S, 2,2) | |
}; | |
// | |
// | |
PPG_Token__ *Token_1_children[15] = { | |
(PPG_Token__*)&Cluster_2, | |
(PPG_Token__*)&Note_3, | |
(PPG_Token__*)&Note_5, | |
(PPG_Token__*)&Note_7, | |
(PPG_Token__*)&Note_10, | |
(PPG_Token__*)&Note_13, | |
(PPG_Token__*)&Note_15, | |
(PPG_Token__*)&Note_18, | |
(PPG_Token__*)&Note_20, | |
(PPG_Token__*)&Note_22, | |
(PPG_Token__*)&Note_24, | |
(PPG_Token__*)&Note_29, | |
(PPG_Token__*)&Note_32, | |
(PPG_Token__*)&Note_35, | |
(PPG_Token__*)&Note_38 | |
}; | |
PPG_Token__ Token_1 = { | |
__GLS_DI__(vtable) &ppg_token_vtable, | |
__GLS_DI__(parent) NULL, | |
__GLS_DI__(children) Token_1_children, | |
__GLS_DI__(n_allocated_children) sizeof(Token_1_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(n_children) sizeof(Token_1_children)/sizeof(PPG_Token__*), | |
__GLS_DI__(action) { | |
__GLS_DI__(callback) (PPG_Action_Callback) { | |
__GLS_DI__(func) NULL, | |
__GLS_DI__(user_data) NULL | |
} | |
}, | |
__GLS_DI__(misc) { | |
__GLS_DI__(state) PPG_Token_Initialized, | |
__GLS_DI__(flags) 0, | |
__GLS_DI__(action_state) 0, | |
__GLS_DI__(action_flags) PPG_Action_Default | |
}, | |
__GLS_DI__(layer) 0 | |
}; | |
//############################################################################## | |
// Context | |
//############################################################################## | |
PPG_Event_Queue_Entry event_buffer[GLS_EVENT_QUEUE_SIZE((11))] = GLS_ZERO_INIT; | |
PPG_Furcation furcations[6] = GLS_ZERO_INIT; | |
PPG_Token__ *tokens[6] = GLS_ZERO_INIT; | |
PPG_Context context = { | |
__GLS_DI__(event_buffer) { | |
__GLS_DI__(events) event_buffer, | |
__GLS_DI__(start) 0, | |
__GLS_DI__(end) 0, | |
__GLS_DI__(cur) 0, | |
__GLS_DI__(size) 0, | |
__GLS_DI__(max_size) GLS_EVENT_QUEUE_SIZE((11)) | |
}, | |
__GLS_DI__(furcation_stack) { | |
__GLS_DI__(furcations) furcations, | |
__GLS_DI__(n_furcations) 0, | |
__GLS_DI__(cur_furcation) 0, | |
__GLS_DI__(max_furcations) 6 | |
}, | |
__GLS_DI__(active_tokens) { | |
__GLS_DI__(tokens) tokens, | |
__GLS_DI__(n_tokens) 0, | |
__GLS_DI__(max_tokens) 6 | |
}, | |
__GLS_DI__(pattern_root) &Token_1, | |
__GLS_DI__(current_token) NULL, | |
__GLS_DI__(properties) { | |
__GLS_DI__(timeout_enabled) GLS_INITIAL_TIMEOUT_ENABLED, | |
__GLS_DI__(papageno_enabled) GLS_INITIAL_PAPAGENO_ENABLED, | |
# if PPG_HAVE_LOGGING | |
__GLS_DI__(logging_enabled) GLS_INITIAL_LOGGING_ENABLED, | |
# endif | |
__GLS_DI__(destruction_enabled) false | |
}, | |
__GLS_DI__(tree_depth) 6, | |
__GLS_DI__(layer) GLS_INITIAL_LAYER, | |
__GLS_DI__(abort_trigger_input) GLS_INITIAL_ABORT_TRIGGER_INPUT, | |
__GLS_DI__(time_last_event) 0, | |
__GLS_DI__(event_timeout) GLS_INITIAL_EVENT_TIMEOUT, | |
__GLS_DI__(event_processor) GLS_INITIAL_EVENT_PROCESSOR, | |
__GLS_DI__(time_manager) { | |
__GLS_DI__(time) &GLS_INITIAL_TIME_FUNCTION, | |
__GLS_DI__(time_difference) &GLS_INITIAL_TIME_DIFFERENCE_FUNCTION, | |
__GLS_DI__(compare_times) &GLS_INITIAL_TIME_COMPARISON_FUNCTION | |
}, | |
__GLS_DI__(signal_callback) { | |
__GLS_DI__(func) GLS_INITIAL_SIGNAL_CALLBACK_FUNC, | |
__GLS_DI__(user_data) GLS_INITIAL_SIGNAL_CALLBACK_USER_DATA | |
} | |
# if PPG_HAVE_STATISTICS | |
, | |
__GLS_DI__(statistics) { | |
__GLS_DI__(n_nodes_visited) 0, | |
__GLS_DI__(n_token_checks) 0, | |
__GLS_DI__(n_furcations) 0, | |
__GLS_DI__(n_reversions) 0 | |
} | |
# endif | |
}; | |
//############################################################################## | |
// Initialization | |
//############################################################################## | |
#define GLS_LOCAL_INITIALIZATION \ | |
/* Configuration of all actions. \ | |
*/ \ | |
GLS_ACTIONS_CONFIGURE_LOCAL_ALL \ | |
\ | |
/* Configuration of all inputs. \ | |
*/ \ | |
GLS_INPUTS_CONFIGURE_LOCAL_ALL \ | |
\ | |
/* Local initialization of actions.\ | |
*/ \ | |
GLS_ACTIONS_INITIALIZE_LOCAL_ALL \ | |
\ | |
/* Local initialization of inputs. \ | |
*/ \ | |
GLS_INPUTS_INITIALIZE_LOCAL_ALL | |
void papageno_initialize_context() | |
{ | |
# ifndef GLS_NO_AUTOMATIC_LOCAL_INITIALIZATION | |
GLS_LOCAL_INITIALIZATION | |
# endif | |
ppg_context = &context; | |
} | |
#ifdef __cplusplus | |
} // end extern "C" | |
#endif | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment