custom-electron-titlebar 4.2.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base/browser/browser.d.ts +26 -0
- package/dist/base/browser/browser.js +317 -0
- package/dist/base/browser/event.d.ts +12 -0
- package/dist/base/browser/event.js +215 -0
- package/dist/base/browser/keyboardEvent.d.ts +38 -0
- package/dist/base/browser/keyboardEvent.js +466 -0
- package/dist/base/browser/mouseEvent.d.ts +61 -0
- package/dist/base/browser/mouseEvent.js +327 -0
- package/dist/base/browser/touch.d.ts +39 -0
- package/dist/base/browser/touch.js +454 -0
- package/dist/base/common/arrays.d.ts +10 -0
- package/dist/base/common/arrays.js +210 -0
- package/dist/base/common/async.d.ts +35 -0
- package/dist/base/common/async.js +280 -0
- package/dist/base/common/charCode.d.ts +405 -0
- package/dist/base/common/charCode.js +9 -0
- package/dist/base/common/color.d.ts +159 -0
- package/dist/base/common/color.js +709 -0
- package/dist/base/common/decorators.d.ts +6 -0
- package/dist/base/common/decorators.js +300 -0
- package/dist/base/common/dom.d.ts +221 -0
- package/dist/base/common/dom.js +1478 -0
- package/dist/base/common/event.d.ts +213 -0
- package/dist/base/common/event.js +804 -0
- package/dist/base/common/iterator.d.ts +69 -0
- package/dist/base/common/iterator.js +381 -0
- package/dist/base/common/keyCodes.d.ts +478 -0
- package/dist/base/common/keyCodes.js +479 -0
- package/dist/base/common/lifecycle.d.ts +17 -0
- package/dist/base/common/lifecycle.js +258 -0
- package/dist/base/common/linkedList.d.ts +17 -0
- package/dist/base/common/linkedList.js +319 -0
- package/dist/base/common/platform.d.ts +33 -0
- package/dist/base/common/platform.js +302 -0
- package/dist/base/common/strings.d.ts +23 -0
- package/dist/base/common/strings.js +273 -0
- package/dist/consts.d.ts +49 -0
- package/dist/consts.js +303 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +211 -0
- package/dist/main/attach-titlebar-to-window.d.ts +3 -0
- package/dist/main/attach-titlebar-to-window.js +207 -0
- package/dist/main/index.d.ts +3 -0
- package/dist/main/index.js +202 -0
- package/dist/main/setup-titlebar.d.ts +2 -0
- package/dist/main/setup-titlebar.js +242 -0
- package/dist/menubar/index.d.ts +86 -0
- package/dist/menubar/index.js +1118 -0
- package/dist/menubar/menu/index.d.ts +46 -0
- package/dist/menubar/menu/index.js +556 -0
- package/dist/menubar/menu/item.d.ts +67 -0
- package/dist/menubar/menu/item.js +575 -0
- package/dist/menubar/menu/separator.d.ts +11 -0
- package/dist/menubar/menu/separator.js +213 -0
- package/dist/menubar/menu/submenu.d.ts +32 -0
- package/dist/menubar/menu/submenu.js +372 -0
- package/dist/menubar/menubar-options.d.ts +55 -0
- package/dist/menubar/menubar-options.js +9 -0
- package/dist/titlebar/index.d.ts +99 -0
- package/dist/titlebar/index.js +663 -0
- package/dist/titlebar/options.d.ts +84 -0
- package/dist/titlebar/options.js +9 -0
- package/dist/titlebar/themebar.d.ts +20 -0
- package/dist/titlebar/themebar.js +267 -0
- package/package.json +1 -1
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
import { OperatingSystem } from '../common/platform';
|
|
2
|
+
/**
|
|
3
|
+
* Virtual Key Codes, the value does not hold any inherent meaning.
|
|
4
|
+
* Inspired somewhat from https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
|
|
5
|
+
* But these are "more general", as they should work across browsers & OS`s.
|
|
6
|
+
*/
|
|
7
|
+
export declare const enum KeyCode {
|
|
8
|
+
/**
|
|
9
|
+
* Placed first to cover the 0 value of the enum.
|
|
10
|
+
*/
|
|
11
|
+
Unknown = 0,
|
|
12
|
+
Backspace = 1,
|
|
13
|
+
Tab = 2,
|
|
14
|
+
Enter = 3,
|
|
15
|
+
Shift = 4,
|
|
16
|
+
Ctrl = 5,
|
|
17
|
+
Alt = 6,
|
|
18
|
+
PauseBreak = 7,
|
|
19
|
+
CapsLock = 8,
|
|
20
|
+
Escape = 9,
|
|
21
|
+
Space = 10,
|
|
22
|
+
PageUp = 11,
|
|
23
|
+
PageDown = 12,
|
|
24
|
+
End = 13,
|
|
25
|
+
Home = 14,
|
|
26
|
+
LeftArrow = 15,
|
|
27
|
+
UpArrow = 16,
|
|
28
|
+
RightArrow = 17,
|
|
29
|
+
DownArrow = 18,
|
|
30
|
+
Insert = 19,
|
|
31
|
+
Delete = 20,
|
|
32
|
+
KEY_0 = 21,
|
|
33
|
+
KEY_1 = 22,
|
|
34
|
+
KEY_2 = 23,
|
|
35
|
+
KEY_3 = 24,
|
|
36
|
+
KEY_4 = 25,
|
|
37
|
+
KEY_5 = 26,
|
|
38
|
+
KEY_6 = 27,
|
|
39
|
+
KEY_7 = 28,
|
|
40
|
+
KEY_8 = 29,
|
|
41
|
+
KEY_9 = 30,
|
|
42
|
+
KEY_A = 31,
|
|
43
|
+
KEY_B = 32,
|
|
44
|
+
KEY_C = 33,
|
|
45
|
+
KEY_D = 34,
|
|
46
|
+
KEY_E = 35,
|
|
47
|
+
KEY_F = 36,
|
|
48
|
+
KEY_G = 37,
|
|
49
|
+
KEY_H = 38,
|
|
50
|
+
KEY_I = 39,
|
|
51
|
+
KEY_J = 40,
|
|
52
|
+
KEY_K = 41,
|
|
53
|
+
KEY_L = 42,
|
|
54
|
+
KEY_M = 43,
|
|
55
|
+
KEY_N = 44,
|
|
56
|
+
KEY_O = 45,
|
|
57
|
+
KEY_P = 46,
|
|
58
|
+
KEY_Q = 47,
|
|
59
|
+
KEY_R = 48,
|
|
60
|
+
KEY_S = 49,
|
|
61
|
+
KEY_T = 50,
|
|
62
|
+
KEY_U = 51,
|
|
63
|
+
KEY_V = 52,
|
|
64
|
+
KEY_W = 53,
|
|
65
|
+
KEY_X = 54,
|
|
66
|
+
KEY_Y = 55,
|
|
67
|
+
KEY_Z = 56,
|
|
68
|
+
Meta = 57,
|
|
69
|
+
ContextMenu = 58,
|
|
70
|
+
F1 = 59,
|
|
71
|
+
F2 = 60,
|
|
72
|
+
F3 = 61,
|
|
73
|
+
F4 = 62,
|
|
74
|
+
F5 = 63,
|
|
75
|
+
F6 = 64,
|
|
76
|
+
F7 = 65,
|
|
77
|
+
F8 = 66,
|
|
78
|
+
F9 = 67,
|
|
79
|
+
F10 = 68,
|
|
80
|
+
F11 = 69,
|
|
81
|
+
F12 = 70,
|
|
82
|
+
F13 = 71,
|
|
83
|
+
F14 = 72,
|
|
84
|
+
F15 = 73,
|
|
85
|
+
F16 = 74,
|
|
86
|
+
F17 = 75,
|
|
87
|
+
F18 = 76,
|
|
88
|
+
F19 = 77,
|
|
89
|
+
NumLock = 78,
|
|
90
|
+
ScrollLock = 79,
|
|
91
|
+
/**
|
|
92
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
93
|
+
* For the US standard keyboard, the ';:' key
|
|
94
|
+
*/
|
|
95
|
+
US_SEMICOLON = 80,
|
|
96
|
+
/**
|
|
97
|
+
* For any country/region, the '+' key
|
|
98
|
+
* For the US standard keyboard, the '=+' key
|
|
99
|
+
*/
|
|
100
|
+
US_EQUAL = 81,
|
|
101
|
+
/**
|
|
102
|
+
* For any country/region, the ',' key
|
|
103
|
+
* For the US standard keyboard, the ',<' key
|
|
104
|
+
*/
|
|
105
|
+
US_COMMA = 82,
|
|
106
|
+
/**
|
|
107
|
+
* For any country/region, the '-' key
|
|
108
|
+
* For the US standard keyboard, the '-_' key
|
|
109
|
+
*/
|
|
110
|
+
US_MINUS = 83,
|
|
111
|
+
/**
|
|
112
|
+
* For any country/region, the '.' key
|
|
113
|
+
* For the US standard keyboard, the '.>' key
|
|
114
|
+
*/
|
|
115
|
+
US_DOT = 84,
|
|
116
|
+
/**
|
|
117
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
118
|
+
* For the US standard keyboard, the '/?' key
|
|
119
|
+
*/
|
|
120
|
+
US_SLASH = 85,
|
|
121
|
+
/**
|
|
122
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
123
|
+
* For the US standard keyboard, the '`~' key
|
|
124
|
+
*/
|
|
125
|
+
US_BACKTICK = 86,
|
|
126
|
+
/**
|
|
127
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
128
|
+
* For the US standard keyboard, the '[{' key
|
|
129
|
+
*/
|
|
130
|
+
US_OPEN_SQUARE_BRACKET = 87,
|
|
131
|
+
/**
|
|
132
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
133
|
+
* For the US standard keyboard, the '\|' key
|
|
134
|
+
*/
|
|
135
|
+
US_BACKSLASH = 88,
|
|
136
|
+
/**
|
|
137
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
138
|
+
* For the US standard keyboard, the ']}' key
|
|
139
|
+
*/
|
|
140
|
+
US_CLOSE_SQUARE_BRACKET = 89,
|
|
141
|
+
/**
|
|
142
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
143
|
+
* For the US standard keyboard, the ''"' key
|
|
144
|
+
*/
|
|
145
|
+
US_QUOTE = 90,
|
|
146
|
+
/**
|
|
147
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
148
|
+
*/
|
|
149
|
+
OEM_8 = 91,
|
|
150
|
+
/**
|
|
151
|
+
* Either the angle bracket key or the backslash key on the RT 102-key keyboard.
|
|
152
|
+
*/
|
|
153
|
+
OEM_102 = 92,
|
|
154
|
+
NUMPAD_0 = 93,
|
|
155
|
+
NUMPAD_1 = 94,
|
|
156
|
+
NUMPAD_2 = 95,
|
|
157
|
+
NUMPAD_3 = 96,
|
|
158
|
+
NUMPAD_4 = 97,
|
|
159
|
+
NUMPAD_5 = 98,
|
|
160
|
+
NUMPAD_6 = 99,
|
|
161
|
+
NUMPAD_7 = 100,
|
|
162
|
+
NUMPAD_8 = 101,
|
|
163
|
+
NUMPAD_9 = 102,
|
|
164
|
+
NUMPAD_MULTIPLY = 103,
|
|
165
|
+
NUMPAD_ADD = 104,
|
|
166
|
+
NUMPAD_SEPARATOR = 105,
|
|
167
|
+
NUMPAD_SUBTRACT = 106,
|
|
168
|
+
NUMPAD_DECIMAL = 107,
|
|
169
|
+
NUMPAD_DIVIDE = 108,
|
|
170
|
+
/**
|
|
171
|
+
* Cover all key codes when IME is processing input.
|
|
172
|
+
*/
|
|
173
|
+
KEY_IN_COMPOSITION = 109,
|
|
174
|
+
ABNT_C1 = 110,
|
|
175
|
+
ABNT_C2 = 111,
|
|
176
|
+
/**
|
|
177
|
+
* Placed last to cover the length of the enum.
|
|
178
|
+
* Please do not depend on this value!
|
|
179
|
+
*/
|
|
180
|
+
MAX_VALUE = 112
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* keyboardEvent.code
|
|
184
|
+
*/
|
|
185
|
+
export declare const enum ScanCode {
|
|
186
|
+
DependsOnKbLayout = -1,
|
|
187
|
+
None = 0,
|
|
188
|
+
Hyper = 1,
|
|
189
|
+
Super = 2,
|
|
190
|
+
Fn = 3,
|
|
191
|
+
FnLock = 4,
|
|
192
|
+
Suspend = 5,
|
|
193
|
+
Resume = 6,
|
|
194
|
+
Turbo = 7,
|
|
195
|
+
Sleep = 8,
|
|
196
|
+
WakeUp = 9,
|
|
197
|
+
KeyA = 10,
|
|
198
|
+
KeyB = 11,
|
|
199
|
+
KeyC = 12,
|
|
200
|
+
KeyD = 13,
|
|
201
|
+
KeyE = 14,
|
|
202
|
+
KeyF = 15,
|
|
203
|
+
KeyG = 16,
|
|
204
|
+
KeyH = 17,
|
|
205
|
+
KeyI = 18,
|
|
206
|
+
KeyJ = 19,
|
|
207
|
+
KeyK = 20,
|
|
208
|
+
KeyL = 21,
|
|
209
|
+
KeyM = 22,
|
|
210
|
+
KeyN = 23,
|
|
211
|
+
KeyO = 24,
|
|
212
|
+
KeyP = 25,
|
|
213
|
+
KeyQ = 26,
|
|
214
|
+
KeyR = 27,
|
|
215
|
+
KeyS = 28,
|
|
216
|
+
KeyT = 29,
|
|
217
|
+
KeyU = 30,
|
|
218
|
+
KeyV = 31,
|
|
219
|
+
KeyW = 32,
|
|
220
|
+
KeyX = 33,
|
|
221
|
+
KeyY = 34,
|
|
222
|
+
KeyZ = 35,
|
|
223
|
+
Digit1 = 36,
|
|
224
|
+
Digit2 = 37,
|
|
225
|
+
Digit3 = 38,
|
|
226
|
+
Digit4 = 39,
|
|
227
|
+
Digit5 = 40,
|
|
228
|
+
Digit6 = 41,
|
|
229
|
+
Digit7 = 42,
|
|
230
|
+
Digit8 = 43,
|
|
231
|
+
Digit9 = 44,
|
|
232
|
+
Digit0 = 45,
|
|
233
|
+
Enter = 46,
|
|
234
|
+
Escape = 47,
|
|
235
|
+
Backspace = 48,
|
|
236
|
+
Tab = 49,
|
|
237
|
+
Space = 50,
|
|
238
|
+
Minus = 51,
|
|
239
|
+
Equal = 52,
|
|
240
|
+
BracketLeft = 53,
|
|
241
|
+
BracketRight = 54,
|
|
242
|
+
Backslash = 55,
|
|
243
|
+
IntlHash = 56,
|
|
244
|
+
Semicolon = 57,
|
|
245
|
+
Quote = 58,
|
|
246
|
+
Backquote = 59,
|
|
247
|
+
Comma = 60,
|
|
248
|
+
Period = 61,
|
|
249
|
+
Slash = 62,
|
|
250
|
+
CapsLock = 63,
|
|
251
|
+
F1 = 64,
|
|
252
|
+
F2 = 65,
|
|
253
|
+
F3 = 66,
|
|
254
|
+
F4 = 67,
|
|
255
|
+
F5 = 68,
|
|
256
|
+
F6 = 69,
|
|
257
|
+
F7 = 70,
|
|
258
|
+
F8 = 71,
|
|
259
|
+
F9 = 72,
|
|
260
|
+
F10 = 73,
|
|
261
|
+
F11 = 74,
|
|
262
|
+
F12 = 75,
|
|
263
|
+
PrintScreen = 76,
|
|
264
|
+
ScrollLock = 77,
|
|
265
|
+
Pause = 78,
|
|
266
|
+
Insert = 79,
|
|
267
|
+
Home = 80,
|
|
268
|
+
PageUp = 81,
|
|
269
|
+
Delete = 82,
|
|
270
|
+
End = 83,
|
|
271
|
+
PageDown = 84,
|
|
272
|
+
ArrowRight = 85,
|
|
273
|
+
ArrowLeft = 86,
|
|
274
|
+
ArrowDown = 87,
|
|
275
|
+
ArrowUp = 88,
|
|
276
|
+
NumLock = 89,
|
|
277
|
+
NumpadDivide = 90,
|
|
278
|
+
NumpadMultiply = 91,
|
|
279
|
+
NumpadSubtract = 92,
|
|
280
|
+
NumpadAdd = 93,
|
|
281
|
+
NumpadEnter = 94,
|
|
282
|
+
Numpad1 = 95,
|
|
283
|
+
Numpad2 = 96,
|
|
284
|
+
Numpad3 = 97,
|
|
285
|
+
Numpad4 = 98,
|
|
286
|
+
Numpad5 = 99,
|
|
287
|
+
Numpad6 = 100,
|
|
288
|
+
Numpad7 = 101,
|
|
289
|
+
Numpad8 = 102,
|
|
290
|
+
Numpad9 = 103,
|
|
291
|
+
Numpad0 = 104,
|
|
292
|
+
NumpadDecimal = 105,
|
|
293
|
+
IntlBackslash = 106,
|
|
294
|
+
ContextMenu = 107,
|
|
295
|
+
Power = 108,
|
|
296
|
+
NumpadEqual = 109,
|
|
297
|
+
F13 = 110,
|
|
298
|
+
F14 = 111,
|
|
299
|
+
F15 = 112,
|
|
300
|
+
F16 = 113,
|
|
301
|
+
F17 = 114,
|
|
302
|
+
F18 = 115,
|
|
303
|
+
F19 = 116,
|
|
304
|
+
F20 = 117,
|
|
305
|
+
F21 = 118,
|
|
306
|
+
F22 = 119,
|
|
307
|
+
F23 = 120,
|
|
308
|
+
F24 = 121,
|
|
309
|
+
Open = 122,
|
|
310
|
+
Help = 123,
|
|
311
|
+
Select = 124,
|
|
312
|
+
Again = 125,
|
|
313
|
+
Undo = 126,
|
|
314
|
+
Cut = 127,
|
|
315
|
+
Copy = 128,
|
|
316
|
+
Paste = 129,
|
|
317
|
+
Find = 130,
|
|
318
|
+
AudioVolumeMute = 131,
|
|
319
|
+
AudioVolumeUp = 132,
|
|
320
|
+
AudioVolumeDown = 133,
|
|
321
|
+
NumpadComma = 134,
|
|
322
|
+
IntlRo = 135,
|
|
323
|
+
KanaMode = 136,
|
|
324
|
+
IntlYen = 137,
|
|
325
|
+
Convert = 138,
|
|
326
|
+
NonConvert = 139,
|
|
327
|
+
Lang1 = 140,
|
|
328
|
+
Lang2 = 141,
|
|
329
|
+
Lang3 = 142,
|
|
330
|
+
Lang4 = 143,
|
|
331
|
+
Lang5 = 144,
|
|
332
|
+
Abort = 145,
|
|
333
|
+
Props = 146,
|
|
334
|
+
NumpadParenLeft = 147,
|
|
335
|
+
NumpadParenRight = 148,
|
|
336
|
+
NumpadBackspace = 149,
|
|
337
|
+
NumpadMemoryStore = 150,
|
|
338
|
+
NumpadMemoryRecall = 151,
|
|
339
|
+
NumpadMemoryClear = 152,
|
|
340
|
+
NumpadMemoryAdd = 153,
|
|
341
|
+
NumpadMemorySubtract = 154,
|
|
342
|
+
NumpadClear = 155,
|
|
343
|
+
NumpadClearEntry = 156,
|
|
344
|
+
ControlLeft = 157,
|
|
345
|
+
ShiftLeft = 158,
|
|
346
|
+
AltLeft = 159,
|
|
347
|
+
MetaLeft = 160,
|
|
348
|
+
ControlRight = 161,
|
|
349
|
+
ShiftRight = 162,
|
|
350
|
+
AltRight = 163,
|
|
351
|
+
MetaRight = 164,
|
|
352
|
+
BrightnessUp = 165,
|
|
353
|
+
BrightnessDown = 166,
|
|
354
|
+
MediaPlay = 167,
|
|
355
|
+
MediaRecord = 168,
|
|
356
|
+
MediaFastForward = 169,
|
|
357
|
+
MediaRewind = 170,
|
|
358
|
+
MediaTrackNext = 171,
|
|
359
|
+
MediaTrackPrevious = 172,
|
|
360
|
+
MediaStop = 173,
|
|
361
|
+
Eject = 174,
|
|
362
|
+
MediaPlayPause = 175,
|
|
363
|
+
MediaSelect = 176,
|
|
364
|
+
LaunchMail = 177,
|
|
365
|
+
LaunchApp2 = 178,
|
|
366
|
+
LaunchApp1 = 179,
|
|
367
|
+
SelectTask = 180,
|
|
368
|
+
LaunchScreenSaver = 181,
|
|
369
|
+
BrowserSearch = 182,
|
|
370
|
+
BrowserHome = 183,
|
|
371
|
+
BrowserBack = 184,
|
|
372
|
+
BrowserForward = 185,
|
|
373
|
+
BrowserStop = 186,
|
|
374
|
+
BrowserRefresh = 187,
|
|
375
|
+
BrowserFavorites = 188,
|
|
376
|
+
ZoomToggle = 189,
|
|
377
|
+
MailReply = 190,
|
|
378
|
+
MailForward = 191,
|
|
379
|
+
MailSend = 192,
|
|
380
|
+
MAX_VALUE = 193
|
|
381
|
+
}
|
|
382
|
+
export declare const ScanCodeUtils: {
|
|
383
|
+
lowerCaseToEnum: (scanCode: string) => number;
|
|
384
|
+
toEnum: (scanCode: string) => number;
|
|
385
|
+
toString: (scanCode: ScanCode) => string;
|
|
386
|
+
};
|
|
387
|
+
export declare namespace KeyCodeUtils {
|
|
388
|
+
function toString(keyCode: KeyCode): string;
|
|
389
|
+
function fromString(key: string): KeyCode;
|
|
390
|
+
function toUserSettingsUS(keyCode: KeyCode): string;
|
|
391
|
+
function toUserSettingsGeneral(keyCode: KeyCode): string;
|
|
392
|
+
function fromUserSettings(key: string): KeyCode;
|
|
393
|
+
}
|
|
394
|
+
export declare const enum KeyMod {
|
|
395
|
+
CtrlCmd = 2048,
|
|
396
|
+
Shift = 1024,
|
|
397
|
+
Alt = 512,
|
|
398
|
+
WinCtrl = 256
|
|
399
|
+
}
|
|
400
|
+
export declare function KeyChord(firstPart: number, secondPart: number): number;
|
|
401
|
+
export declare const enum KeybindingType {
|
|
402
|
+
Simple = 1,
|
|
403
|
+
Chord = 2
|
|
404
|
+
}
|
|
405
|
+
export declare class SimpleKeybinding {
|
|
406
|
+
readonly type = KeybindingType.Simple;
|
|
407
|
+
readonly ctrlKey: boolean;
|
|
408
|
+
readonly shiftKey: boolean;
|
|
409
|
+
readonly altKey: boolean;
|
|
410
|
+
readonly metaKey: boolean;
|
|
411
|
+
readonly keyCode: KeyCode;
|
|
412
|
+
constructor(ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean, keyCode: KeyCode);
|
|
413
|
+
equals(other: Keybinding): boolean;
|
|
414
|
+
getHashCode(): string;
|
|
415
|
+
isModifierKey(): boolean;
|
|
416
|
+
/**
|
|
417
|
+
* Does this keybinding refer to the key code of a modifier and it also has the modifier flag?
|
|
418
|
+
*/
|
|
419
|
+
isDuplicateModifierCase(): boolean;
|
|
420
|
+
}
|
|
421
|
+
export declare class ChordKeybinding {
|
|
422
|
+
readonly type = KeybindingType.Chord;
|
|
423
|
+
readonly firstPart: SimpleKeybinding;
|
|
424
|
+
readonly chordPart: SimpleKeybinding;
|
|
425
|
+
constructor(firstPart: SimpleKeybinding, chordPart: SimpleKeybinding);
|
|
426
|
+
getHashCode(): string;
|
|
427
|
+
}
|
|
428
|
+
export type Keybinding = SimpleKeybinding | ChordKeybinding;
|
|
429
|
+
export declare function createKeybinding(keybinding: number, OS: OperatingSystem): Keybinding | null;
|
|
430
|
+
export declare function createSimpleKeybinding(keybinding: number, OS: OperatingSystem): SimpleKeybinding;
|
|
431
|
+
export declare class ResolvedKeybindingPart {
|
|
432
|
+
readonly ctrlKey: boolean;
|
|
433
|
+
readonly shiftKey: boolean;
|
|
434
|
+
readonly altKey: boolean;
|
|
435
|
+
readonly metaKey: boolean;
|
|
436
|
+
readonly keyLabel: string | null;
|
|
437
|
+
readonly keyAriaLabel: string | null;
|
|
438
|
+
constructor(ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean, kbLabel: string | null, kbAriaLabel: string | null);
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* A resolved keybinding. Can be a simple keybinding or a chord keybinding.
|
|
442
|
+
*/
|
|
443
|
+
export declare abstract class ResolvedKeybinding {
|
|
444
|
+
/**
|
|
445
|
+
* This prints the binding in a format suitable for displaying in the UI.
|
|
446
|
+
*/
|
|
447
|
+
abstract getLabel(): string | null;
|
|
448
|
+
/**
|
|
449
|
+
* This prints the binding in a format suitable for ARIA.
|
|
450
|
+
*/
|
|
451
|
+
abstract getAriaLabel(): string | null;
|
|
452
|
+
/**
|
|
453
|
+
* This prints the binding in a format suitable for electron's accelerators.
|
|
454
|
+
* See https://github.com/electron/electron/blob/master/docs/api/accelerator.md
|
|
455
|
+
*/
|
|
456
|
+
abstract getElectronAccelerator(): string | null;
|
|
457
|
+
/**
|
|
458
|
+
* This prints the binding in a format suitable for user settings.
|
|
459
|
+
*/
|
|
460
|
+
abstract getUserSettingsLabel(): string | null;
|
|
461
|
+
/**
|
|
462
|
+
* Is the user settings label reflecting the label?
|
|
463
|
+
*/
|
|
464
|
+
abstract isWYSIWYG(): boolean;
|
|
465
|
+
/**
|
|
466
|
+
* Is the binding a chord?
|
|
467
|
+
*/
|
|
468
|
+
abstract isChord(): boolean;
|
|
469
|
+
/**
|
|
470
|
+
* Returns the firstPart, chordPart that should be used for dispatching.
|
|
471
|
+
*/
|
|
472
|
+
abstract getDispatchParts(): [string | null, string | null];
|
|
473
|
+
/**
|
|
474
|
+
* Returns the firstPart, chordPart of the keybinding.
|
|
475
|
+
* For simple keybindings, the second element will be null.
|
|
476
|
+
*/
|
|
477
|
+
abstract getParts(): [ResolvedKeybindingPart, ResolvedKeybindingPart | null];
|
|
478
|
+
}
|