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 | "use strict" ;
|
28 |
|
29 |
|
30 |
|
31 |
|
32 | exports.control = {
|
33 | '\\x07': { event: 'bell' } ,
|
34 |
|
35 |
|
36 |
|
37 | '\\x08': { event: 'cursor' , subType: 'left' , extraArgs: [ 1 ] } ,
|
38 |
|
39 | '\\x09': { event: 'cursor' , subType: 'tab' } ,
|
40 | '\\x0a': { event: 'cursor' , subType: 'lineFeed' } ,
|
41 | '\\x0d': { event: 'cursor' , subType: 'carriageReturn' } ,
|
42 |
|
43 |
|
44 |
|
45 | '\\x7f': { event: 'none' }
|
46 | } ;
|
47 |
|
48 |
|
49 |
|
50 |
|
51 | exports.ESC = {
|
52 | '7': { event: 'cursor' , subType: 'save' } ,
|
53 | '8': { event: 'cursor' , subType: 'restore' } ,
|
54 | 'c': { event: 'reset' } ,
|
55 | 'M': { event: 'edit' , subType: 'reverseLineFeed' }
|
56 | } ;
|
57 |
|
58 |
|
59 |
|
60 |
|
61 | exports.CSI = {
|
62 | A: { event: 'cursor' , subType: 'up' , defaultExtraArgs: [ 1 ] } ,
|
63 | B: { event: 'cursor' , subType: 'down' , defaultExtraArgs: [ 1 ] } ,
|
64 | C: { event: 'cursor' , subType: 'right' , defaultExtraArgs: [ 1 ] } ,
|
65 | D: { event: 'cursor' , subType: 'left' , defaultExtraArgs: [ 1 ] } ,
|
66 | E: { event: 'cursor' , subType: 'nextLine' , defaultExtraArgs: [ 1 ] } ,
|
67 | F: { event: 'cursor' , subType: 'previousLine' , defaultExtraArgs: [ 1 ] } ,
|
68 | G: { event: 'cursor' , subType: 'column' } ,
|
69 | H: { event: 'cursor' , subType: 'moveToYX' , defaultExtraArgs: [ 1 , 1 ] } ,
|
70 |
|
71 | J: {
|
72 | event: 'edit' ,
|
73 | subType: 'eraseDisplay' ,
|
74 | arg: 'after' ,
|
75 | subTree: {
|
76 | '0': { arg: 'after' } ,
|
77 | '1': { arg: 'before' } ,
|
78 | '2': { arg: 'display' }
|
79 | }
|
80 | } ,
|
81 |
|
82 | K: {
|
83 | event: 'edit' ,
|
84 | subType: 'eraseLine' ,
|
85 | arg: 'after' ,
|
86 | subTree: {
|
87 | '0': { arg: 'after' } ,
|
88 | '1': { arg: 'before' } ,
|
89 | '2': { arg: 'line' }
|
90 | }
|
91 | } ,
|
92 |
|
93 | L: { event: 'edit' , subType: 'insertLine' , defaultExtraArgs: [ 1 ] } ,
|
94 | M: { event: 'edit' , subType: 'deleteLine' , defaultExtraArgs: [ 1 ] } ,
|
95 |
|
96 | P: { event: 'edit' , subType: 'delete' , defaultExtraArgs: [ 1 ] } ,
|
97 | S: { event: 'edit' , subType: 'vScrollUp' , defaultExtraArgs: [ 1 ] } ,
|
98 | T: { event: 'edit' , subType: 'vScrollDown' , defaultExtraArgs: [ 1 ] } ,
|
99 | X: { event: 'edit' , subType: 'erase' , defaultExtraArgs: [ 1 ] } ,
|
100 |
|
101 | d: { event: 'cursor' , subType: 'row' } ,
|
102 |
|
103 | '?h': {
|
104 | event: 'device' ,
|
105 | arg: true ,
|
106 | subTree: {
|
107 | '1000': { subType: 'mouseButton' , continue: true } ,
|
108 | '1002': { subType: 'mouseDrag' , continue: true } ,
|
109 | '1003': { subType: 'mouseMotion' , continue: true } ,
|
110 | '1004': { subType: 'focusEvent' , continue: true } ,
|
111 | '1006': { event: 'none' , continue: true }
|
112 | }
|
113 | } ,
|
114 | '?l': {
|
115 |
|
116 | event: 'device' ,
|
117 | arg: false ,
|
118 | subTree: null
|
119 | } ,
|
120 |
|
121 | n: {
|
122 |
|
123 | event: 'device' ,
|
124 | subTree: {
|
125 | '6': { subType: 'cursorLocation' }
|
126 | }
|
127 | } ,
|
128 | '?n': {
|
129 |
|
130 | event: 'device' ,
|
131 | subTree: {
|
132 | '6': { subType: 'cursorLocation' , arg: true }
|
133 | }
|
134 | } ,
|
135 |
|
136 | m: {
|
137 |
|
138 | event: 'attr' ,
|
139 | subType: 'reset' ,
|
140 | subTree: {
|
141 | '0': { subType: 'reset' , continue: true } ,
|
142 |
|
143 | '1': { subType: 'bold' , arg: true , continue: true } ,
|
144 | '2': { subType: 'dim' , arg: true , continue: true } ,
|
145 | '3': { subType: 'italic' , arg: true , continue: true } ,
|
146 | '4': { subType: 'underline' , arg: true , continue: true } ,
|
147 | '5': { subType: 'blink' , arg: true , continue: true } ,
|
148 | '7': { subType: 'inverse' , arg: true , continue: true } ,
|
149 | '8': { subType: 'hidden' , arg: true , continue: true } ,
|
150 | '9': { subType: 'strike' , arg: true , continue: true } ,
|
151 |
|
152 | '21': { subType: 'bold' , arg: false , continue: true } ,
|
153 | '22': { subType: 'noDimNoBold' , continue: true } ,
|
154 | '23': { subType: 'italic' , arg: false , continue: true } ,
|
155 | '24': { subType: 'underline' , arg: false , continue: true } ,
|
156 | '25': { subType: 'blink' , arg: false , continue: true } ,
|
157 | '27': { subType: 'inverse' , arg: false , continue: true } ,
|
158 | '28': { subType: 'hidden' , arg: false , continue: true } ,
|
159 | '29': { subType: 'strike' , arg: false , continue: true } ,
|
160 |
|
161 | '30': { subType: 'color' , arg: 'black' , continue: true } ,
|
162 | '31': { subType: 'color' , arg: 'red' , continue: true } ,
|
163 | '32': { subType: 'color' , arg: 'green' , continue: true } ,
|
164 | '33': { subType: 'color' , arg: 'yellow' , continue: true } ,
|
165 | '34': { subType: 'color' , arg: 'blue' , continue: true } ,
|
166 | '35': { subType: 'color' , arg: 'magenta' , continue: true } ,
|
167 | '36': { subType: 'color' , arg: 'cyan' , continue: true } ,
|
168 | '37': { subType: 'color' , arg: 'white' , continue: true } ,
|
169 | '38': {
|
170 | subTree: {
|
171 | '2': { subType: 'colorRgb' } ,
|
172 | '5': { subType: 'color256' }
|
173 | }
|
174 | } ,
|
175 | '39': { subType: 'color' , arg: 'default' , continue: true } ,
|
176 |
|
177 | '40': { subType: 'bgColor' , arg: 'black' , continue: true } ,
|
178 | '41': { subType: 'bgColor' , arg: 'red' , continue: true } ,
|
179 | '42': { subType: 'bgColor' , arg: 'green' , continue: true } ,
|
180 | '43': { subType: 'bgColor' , arg: 'yellow' , continue: true } ,
|
181 | '44': { subType: 'bgColor' , arg: 'blue' , continue: true } ,
|
182 | '45': { subType: 'bgColor' , arg: 'magenta' , continue: true } ,
|
183 | '46': { subType: 'bgColor' , arg: 'cyan' , continue: true } ,
|
184 | '47': { subType: 'bgColor' , arg: 'white' , continue: true } ,
|
185 | '48': {
|
186 | subTree: {
|
187 | '2': { subType: 'bgColorRgb' } ,
|
188 | '5': { subType: 'bgColor256' }
|
189 | }
|
190 | } ,
|
191 | '49': { subType: 'bgColor' , arg: 'default' , continue: true } ,
|
192 |
|
193 | '90': { subType: 'color' , arg: 'gray' , continue: true } ,
|
194 | '91': { subType: 'color' , arg: 'brightRed' , continue: true } ,
|
195 | '92': { subType: 'color' , arg: 'brightGreen' , continue: true } ,
|
196 | '93': { subType: 'color' , arg: 'brightYellow' , continue: true } ,
|
197 | '94': { subType: 'color' , arg: 'brightBlue' , continue: true } ,
|
198 | '95': { subType: 'color' , arg: 'brightMagenta' , continue: true } ,
|
199 | '96': { subType: 'color' , arg: 'brightCyan' , continue: true } ,
|
200 | '97': { subType: 'color' , arg: 'brightWhite' , continue: true } ,
|
201 |
|
202 | '100': { subType: 'bgColor' , arg: 'gray' , continue: true } ,
|
203 | '101': { subType: 'bgColor' , arg: 'brightRed' , continue: true } ,
|
204 | '102': { subType: 'bgColor' , arg: 'brightGreen' , continue: true } ,
|
205 | '103': { subType: 'bgColor' , arg: 'brightYellow' , continue: true } ,
|
206 | '104': { subType: 'bgColor' , arg: 'brightBlue' , continue: true } ,
|
207 | '105': { subType: 'bgColor' , arg: 'brightMagenta' , continue: true } ,
|
208 | '106': { subType: 'bgColor' , arg: 'brightCyan' , continue: true } ,
|
209 | '107': { subType: 'bgColor' , arg: 'brightWhite' , continue: true }
|
210 | }
|
211 | } ,
|
212 |
|
213 | r: { event: 'edit' , subType: 'vScrollingRegion' } ,
|
214 | t: {
|
215 | event: 'device' ,
|
216 | subTree: {
|
217 | '18': { subType: 'screenSize' }
|
218 | }
|
219 | }
|
220 | } ;
|
221 |
|
222 | exports.CSI['?l'].subTree = exports.CSI['?h'].subTree ;
|
223 |
|
224 |
|
225 |
|
226 |
|
227 | exports.OSC = {
|
228 | '0': { event: 'system' , subType: 'setWindowTitle' } ,
|
229 | '1': { event: 'system' , subType: 'setIconName' } ,
|
230 | '2': { event: 'system' , subType: 'setWindowTitle' } ,
|
231 | '4': { event: 'palette' , subType: 'setColor' } ,
|
232 | '4?': { event: 'palette' , subType: 'getColor' } ,
|
233 | '7': { event: 'system' , subType: 'setCwd' } ,
|
234 | '9': { event: 'system' , subType: 'notify' } ,
|
235 | '10': { event: 'palette' , subType: 'setDefaultColor' } ,
|
236 | '11': { event: 'palette' , subType: 'setDefaultBgColor' } ,
|
237 | '12': { event: 'cursorAttr' , subType: 'setColor' } ,
|
238 | '17': { event: 'palette' , subType: 'setHighlightBgColor' } ,
|
239 | '50': { event: 'cursorAttr' , subType: 'setShape' } ,
|
240 | '104': { event: 'palette' , subType: 'resetColor' } ,
|
241 | '110': { event: 'palette' , subType: 'resetDefaultColor' } ,
|
242 | '111': { event: 'palette' , subType: 'resetDefaultBgColor' } ,
|
243 | '112': { event: 'cursorAttr' , subType: 'resetColor' } ,
|
244 | '117': { event: 'palette' , subType: 'resetHighlightBgColor' } ,
|
245 | '777': {
|
246 | event: 'system' ,
|
247 | subTree: {
|
248 | 'notify': { subType: 'notify' }
|
249 | }
|
250 | }
|
251 | } ;
|
252 |
|