@overlayed/app 0.2.2 → 0.4.0

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/index.d.ts CHANGED
@@ -1,3 +1,765 @@
1
- export * from './overlayed';
2
- export { type OverlayedApp } from './types';
3
- //# sourceMappingURL=index.d.ts.map
1
+ /// <reference types="electron" />
2
+ /// <reference types="node" />
3
+
4
+ import { Module } from 'arktype';
5
+ import { ObjectType } from 'arktype/internal/methods/object.ts';
6
+ import { Out } from 'arktype/internal/attributes.ts';
7
+ import { Process } from '@overlayed-gg/native-interface';
8
+
9
+ export const enum AccessLevel {
10
+ Default = 0,
11
+ Global = 1,
12
+ Admin = 2,
13
+ }
14
+
15
+ export declare type ActiveGameInfo = {
16
+ isConnected: boolean;
17
+ resolution: {
18
+ width: number;
19
+ height: number;
20
+ };
21
+ };
22
+
23
+ declare const BaseEvent: ObjectType< {
24
+ game: string;
25
+ type: string;
26
+ creation_time: number;
27
+ }, {}>;
28
+
29
+ declare type BaseEvent = typeof BaseEvent.infer;
30
+
31
+ declare type CustomLoggerScope = ReturnType<typeof Logger.scope>;
32
+
33
+ declare type ErrorEvents = ErrorPipeServerError | ErrorInvalidConfigFile;
34
+
35
+ declare interface ErrorInvalidConfigFile extends ErrorManagerEvent {
36
+ code: "INVALID_CONFIG_FILE";
37
+ data: {
38
+ issues: string[];
39
+ filePath: string;
40
+ data: unknown;
41
+ };
42
+ }
43
+
44
+ declare type ErrorManagerEvent = {
45
+ code: string;
46
+ message: string;
47
+ data: Record<string, any>;
48
+ timestamp: number;
49
+ };
50
+
51
+ declare type ErrorManagerEvents = {
52
+ fatal: FatalEvents;
53
+ error: ErrorEvents;
54
+ warning: WarningEvents;
55
+ };
56
+
57
+ declare interface ErrorPipeServerError extends ErrorManagerEvent {
58
+ code: "PIPE_SERVER_ERROR";
59
+ data: {
60
+ error: unknown;
61
+ };
62
+ }
63
+
64
+ declare type EventCallback<TEvent extends BaseEvent, TEventType extends EventType<TEvent>> = (event: Extract<TEvent, {
65
+ type: TEventType;
66
+ }>) => void;
67
+
68
+ declare type EventType<TEvent extends BaseEvent> = TEvent["type"];
69
+
70
+ declare interface FatalElevationMismatch extends ErrorManagerEvent {
71
+ code: "ELEVATION_MISMATCH";
72
+ data: {
73
+ appElevated: boolean;
74
+ gameElevated: boolean;
75
+ };
76
+ }
77
+
78
+ declare type FatalEvents = FatalElevationMismatch;
79
+
80
+ export declare type GameLaunchManagerEvents = {
81
+ gameLaunchInternal: {
82
+ ravenGame: RavenGame;
83
+ process: Process;
84
+ };
85
+ gameCloseInternal: {
86
+ ravenGame: RavenGame;
87
+ process: Process;
88
+ };
89
+ gameLaunch: {
90
+ game: string;
91
+ };
92
+ gameClose: {
93
+ game: string;
94
+ };
95
+ };
96
+
97
+ declare interface GameModule<TEvents extends Record<string, BaseEvent> = Record<string, BaseEvent>, TKey extends string = string> {
98
+ key: TKey;
99
+ events: Module<GameModuleEvent<TEvents>>;
100
+ }
101
+
102
+ declare type GameModuleEvent<TEvents extends Record<string, BaseEvent>> = TEvents & {
103
+ event: BaseEvent;
104
+ };
105
+
106
+ declare type GameModuleEventInfer<TModule extends GameModule> = TModule["events"]["event"]["infer"];
107
+
108
+ declare type KeybindCallbacks = {
109
+ toggle?: KeybindPressedCallback;
110
+ down?: KeybindDownCallback;
111
+ up?: KeybindUpCallback;
112
+ };
113
+
114
+ export declare type KeybindConfig = (typeof KeybindSchema.infer)[string];
115
+
116
+ declare type KeybindDownCallback = () => string | void;
117
+
118
+ declare type KeybindPressedCallback = () => string | void;
119
+
120
+ declare const KeybindSchema: ObjectType< {
121
+ [x: string]: {
122
+ keys: string[];
123
+ mode: (In: "toggle" | "hold") => Out<"toggle" | "hold">;
124
+ };
125
+ }, {}>;
126
+
127
+ declare type KeybindUpCallback = () => void;
128
+
129
+ export interface KeyboardKeyEvent extends WindowEvent {
130
+ key: VirtualKey;
131
+ }
132
+
133
+ declare const Logger = {
134
+ scope: (name: string) => {
135
+ return {
136
+ log: (...args: any[]) => {
137
+ console.log(name, ...args);
138
+ },
139
+ error: (...args: any[]) => {
140
+ console.error(name, ...args);
141
+ },
142
+ warn: (...args: any[]) => {
143
+ console.warn(name, ...args);
144
+ },
145
+ info: (...args: any[]) => {
146
+ console.info(name, ...args);
147
+ },
148
+ debug: (...args: any[]) => {
149
+ console.debug(name, ...args);
150
+ },
151
+ captureSentryException: (...args: any[]) => {
152
+ console.error(name, ...args);
153
+ },
154
+ sentryError: (...args: any[]) => {
155
+ console.error(name, ...args);
156
+ },
157
+ sentryLog: (...args: any[]) => {
158
+ console.log(name, ...args);
159
+ },
160
+ sentryWarn: (...args: any[]) => {
161
+ console.warn(name, ...args);
162
+ },
163
+ };
164
+ },
165
+ error: (...args: any[]) => {
166
+ console.error(name, ...args);
167
+ },
168
+ warn: (...args: any[]) => {
169
+ console.warn(name, ...args);
170
+ },
171
+ info: (...args: any[]) => {
172
+ console.info(name, ...args);
173
+ },
174
+ debug: (...args: any[]) => {
175
+ console.debug(name, ...args);
176
+ },
177
+ captureSentryException: (...args: any[]) => {
178
+ console.error(name, ...args);
179
+ },
180
+ sentryError: (...args: any[]) => {
181
+ console.error(name, ...args);
182
+ },
183
+ sentryLog: (...args: any[]) => {
184
+ console.log(name, ...args);
185
+ },
186
+ sentryWarn: (...args: any[]) => {
187
+ console.warn(name, ...args);
188
+ },
189
+ sentryInfo: (...args: any[]) => {
190
+ console.info(name, ...args);
191
+ },
192
+ };
193
+
194
+ /** This should be kept in sync with EventEmitterManager */
195
+ declare class Manager {
196
+ protected logger: CustomLoggerScope;
197
+ initialized: boolean;
198
+ constructor(name: string);
199
+ init(): void;
200
+ destroy(): void;
201
+ }
202
+
203
+ export interface MouseButtonEvent extends WindowEvent {
204
+ x: number;
205
+ y: number;
206
+
207
+ globalX: number;
208
+ globalY: number;
209
+
210
+ key: VirtualKey;
211
+ }
212
+
213
+ export declare function overlayed<TModule extends GameModule, TShortcut extends string>(data: OverlayedData<TModule, TShortcut>): OverlayedApp<TModule, TShortcut>;
214
+
215
+ export declare type OverlayedApp<TModule extends GameModule, TKeybind extends string> = OverlayedAppGameModules<TModule> & OverlayedAppHandlers & {
216
+ keybinds: OverlayedAppKeybindModule<TKeybind>;
217
+ windows: OverlayedAppWindowsModule;
218
+ input: OverlayedAppInputModule;
219
+ /**
220
+ * Returns true if any monitored processes are running.
221
+ *
222
+ * Useful for stopping the overlay from updating when the game is running.
223
+ */
224
+ hasAnyActiveProcesses: () => boolean;
225
+ /**
226
+ * Initializes the overlayed app.
227
+ *
228
+ * This should only be called once, and is automatically called by default, unless `init: false` is passed:
229
+ * ```ts
230
+ * overlayed({
231
+ * init: false,
232
+ * });
233
+ * ```
234
+ */
235
+ init: () => void;
236
+ };
237
+
238
+ declare type OverlayedAppGameModules<TModule extends GameModule> = {
239
+ [TKey in TModule["key"]]: {
240
+ onAny<TEvent extends Extract<TModule, {
241
+ key: TKey;
242
+ }>["events"]["event"]["infer"]>(cb: (data: TEvent) => void): void;
243
+ on<TEvent extends Extract<TModule, {
244
+ key: TKey;
245
+ }>["events"]["event"]["infer"], TEventType extends EventType<TEvent> = EventType<TEvent>>(event: TEventType, cb: EventCallback<TEvent, TEventType>): void;
246
+ offAny<TEvent extends Extract<TModule, {
247
+ key: TKey;
248
+ }>["events"]["event"]["infer"]>(cb: (data: TEvent) => void): void;
249
+ off<TEvent extends GameModuleEventInfer<Extract<TModule, {
250
+ key: TKey;
251
+ }>>, TEventType extends EventType<TEvent> = EventType<TEvent>>(event: TEventType, cb: EventCallback<TEvent, TEventType>): void;
252
+ };
253
+ };
254
+
255
+ declare type OverlayedAppHandlers = {
256
+ on: <TEvent extends keyof OverlayedAppHandlersMapping = keyof OverlayedAppHandlersMapping>(event: TEvent, cb: OverlayedAppHandlersMapping[TEvent]) => void;
257
+ off: <TEvent extends keyof OverlayedAppHandlersMapping = keyof OverlayedAppHandlersMapping>(event: TEvent, cb: OverlayedAppHandlersMapping[TEvent]) => void;
258
+ };
259
+
260
+ declare type OverlayedAppHandlersMapping = {
261
+ error: (data: ErrorManagerEvents["error"]) => void;
262
+ warning: (data: ErrorManagerEvents["warning"]) => void;
263
+ fatal: (data: ErrorManagerEvents["fatal"]) => void;
264
+ gameLaunch: (data: GameLaunchManagerEvents["gameLaunch"]) => void;
265
+ gameClose: (data: GameLaunchManagerEvents["gameClose"]) => void;
266
+ };
267
+
268
+ declare interface OverlayedAppInputModule {
269
+ scope: (scopeName: string) => ReturnType<OverridesManager["scope"]>;
270
+ raw: OverlayedAppInputModuleRaw;
271
+ }
272
+
273
+ declare type OverlayedAppInputModuleRaw = {
274
+ /**
275
+ * Block the game from receiving mouse input.
276
+ *
277
+ * @param block Whether to block mouse input.
278
+ */
279
+ setGlobalMouseBlock(block: boolean): void;
280
+ /**
281
+ * Block the game from receiving keyboard input.
282
+ *
283
+ * @param block Whether to block keyboard input.
284
+ */
285
+ setGlobalKeyboardBlock(block: boolean): void;
286
+ /**
287
+ * Show or hide the cursor.
288
+ *
289
+ * @param show Whether to show or hide the cursor.
290
+ */
291
+ setGlobalCursorOverride(show: boolean): void;
292
+ /**
293
+ * Block the game from receiving input for a specific key.
294
+ *
295
+ * @param key The key to block input for.
296
+ * @param block Whether to block input for the key.
297
+ */
298
+ setKeyInputBlock(key: VirtualKey, block: boolean): void;
299
+ /**
300
+ * Get the current state of the global mouse block.
301
+ */
302
+ getGlobalMouseBlock(): boolean;
303
+ /**
304
+ * Get the current state of the global keyboard block.
305
+ */
306
+ getGlobalKeyboardBlock(): boolean;
307
+ /**
308
+ * Get the current state of the global cursor override.
309
+ */
310
+ getGlobalCursorOverride(): boolean;
311
+ /**
312
+ * Get the current state of the key input block for a specific key.
313
+ * @param key The key to block input for.
314
+ */
315
+ getKeyInputBlock(key: VirtualKey): boolean;
316
+ };
317
+
318
+ declare type OverlayedAppKeybindModule<TKeybind extends string> = Record<TKeybind, {
319
+ on: <TEvent extends "down" | "up" | "toggle">(event: TEvent, cb: KeybindCallbacks[TEvent]) => void;
320
+ }> & {
321
+ /**
322
+ * Get the current user keybinds.
323
+ */
324
+ getConfig: () => OverlayedAppKeybindsConfig<TKeybind>;
325
+ /**
326
+ * Pause keybind listening. Essential for pausing keybind listening when recording new keybinds.
327
+ */
328
+ pauseKeybindListening: () => void;
329
+ /**
330
+ * Resume keybind listening. Essential for resuming keybind listening after recording new keybinds.
331
+ */
332
+ resumeKeybindListening: () => void;
333
+ /**
334
+ * Update a single keybind.
335
+ *
336
+ * @param keybind The keybind to update.
337
+ * @param keybindConfig The new keybind config.
338
+ */
339
+ updateKeybind: (keybind: TKeybind, keybindConfig: OverlayedAppKeybindsConfig<TKeybind>[TKeybind]) => void;
340
+ /**
341
+ * Bulk update keybinds.
342
+ *
343
+ * @param keybinds The keybinds to update. Keybind keys not provided will not be updated.
344
+ */
345
+ updateKeybinds: (keybinds: Partial<OverlayedAppKeybindsConfig<TKeybind>>) => void;
346
+ };
347
+
348
+ declare type OverlayedAppKeybindsConfig<TKeybind extends string> = Record<TKeybind, {
349
+ /**
350
+ * - An array of [KeyboardEvent#code](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code)
351
+ * - Whatever you configure will be the default value
352
+ * - [Here](https://www.toptal.com/developers/keycode) is a good tool to easily find the codes for a given hotkey
353
+ */
354
+ keys: Array<OverlayedAppKeybindsConfigKey>;
355
+ /**
356
+ * - `toggle` will trigger the callback when the key is toggled on and off
357
+ * - `hold` will trigger the callback when the key is held down
358
+ * - This can be updated at runtime
359
+ */
360
+ mode: OverlayedAppKeybindsConfigMode;
361
+ }>;
362
+
363
+ declare type OverlayedAppKeybindsConfigKey = "ctrl" | "shift" | "alt" | (string & {});
364
+
365
+ declare type OverlayedAppKeybindsConfigMode = "toggle" | "hold";
366
+
367
+ declare interface OverlayedAppWindowsModule extends Pick<RenderInterface, "on" | "off" | "once" | "addListener" | "prependListener" | "prependOnceListener" | "removeListener" | "removeAllListeners"> {
368
+ createWindow(options: RenderWindowConstructorOptions): RenderWindow;
369
+ getActiveGameInfo: () => ActiveGameInfo;
370
+ }
371
+
372
+ declare interface OverlayedData<TModule extends GameModule, TKeybind extends string> {
373
+ /**
374
+ * The app name.
375
+ *
376
+ * TODO: replace with endpoint to get app name from server.
377
+ */
378
+ appName: string;
379
+ /**
380
+ * App modules to load.
381
+ */
382
+ modules: TModule[];
383
+ /**
384
+ * App keybinds config.
385
+ */
386
+ keybinds: OverlayedAppKeybindsConfig<TKeybind>;
387
+ /**
388
+ * Whether to initialize the app when the module is loaded.
389
+ * @default true;
390
+ */
391
+ init?: boolean;
392
+ }
393
+
394
+ declare class OverridesManager extends Manager {
395
+ private renderInterface;
396
+ private globalCursorOverrideCount;
397
+ private globalMouseBlockCount;
398
+ private globalKeyboardBlockCount;
399
+ private keyInputBlocks;
400
+ constructor(interfaceName: RenderInterfaceName);
401
+ scope(scopeName: string): OverridesManagerScope;
402
+ private setGlobalCursorOverride;
403
+ private setGlobalMouseBlock;
404
+ private setGlobalKeyboardBlock;
405
+ private setKeyInputBlock;
406
+ }
407
+
408
+ export declare interface OverridesManagerScope {
409
+ setGlobalCursorOverride: (override: boolean) => void;
410
+ setGlobalMouseBlock: (block: boolean) => void;
411
+ setGlobalKeyboardBlock: (block: boolean) => void;
412
+ setKeyInputBlock: (key: number, block: boolean) => void;
413
+ }
414
+
415
+ declare interface RavenGame {
416
+ name: string;
417
+ identifier: RavenGameIdentifier;
418
+ executables: string[];
419
+ dlls_to_inject: string[];
420
+ version_pattern: string;
421
+ }
422
+
423
+ declare type RavenGameIdentifier = "siege";
424
+
425
+ export class RenderInterface {
426
+ constructor(name: String, options?: { maxWindowCount?: number; eventQueueSize?: number; access?: AccessLevel }); // default: { maxWindowCount: 10, eventQueueSize: 200, access: AccessLevel.Default }
427
+
428
+ newWindowInternal(browserWindow: Electron.BrowserWindow, options?: RenderWindowConstructorOptions): RenderWindow;
429
+
430
+ getGlobalMouseBlock(): boolean;
431
+ getGlobalKeyboardBlock(): boolean;
432
+ getGlobalCursorOverride(): boolean;
433
+ getKeyInputBlock(key: VirtualKey): boolean;
434
+
435
+ setGlobalMouseBlock(block: boolean): void;
436
+ setGlobalKeyboardBlock(block: boolean): void;
437
+ setGlobalCursorOverride(show: boolean): void;
438
+ setKeyInputBlock(key: VirtualKey, block: boolean): void;
439
+
440
+ eventNames(): string[];
441
+ getMaxListeners(): number;
442
+ removeAllListeners(): this;
443
+
444
+ listeners(eventName: "keyDown"): Function[];
445
+ rawListeners(eventName: "keyDown"): Function[];
446
+ listenerCount(eventName: "keyDown", listener?: (event: KeyboardKeyEvent) => void): number;
447
+
448
+ on(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
449
+ once(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
450
+ addListener(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
451
+ prependListener(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
452
+ prependOnceListener(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
453
+
454
+ off(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
455
+ removeListener(eventName: "keyDown", listener: (event: KeyboardKeyEvent) => void): this;
456
+ removeAllListeners(eventName: "keyDown"): this;
457
+
458
+ listeners(eventName: "keyUp"): Function[];
459
+ rawListeners(eventName: "keyUp"): Function[];
460
+ listenerCount(eventName: "keyUp", listener?: (event: KeyboardKeyEvent) => void): number;
461
+
462
+ on(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
463
+ once(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
464
+ addListener(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
465
+ prependListener(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
466
+ prependOnceListener(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
467
+
468
+ off(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
469
+ removeListener(eventName: "keyUp", listener: (event: KeyboardKeyEvent) => void): this;
470
+ removeAllListeners(eventName: "keyUp"): this;
471
+
472
+ listeners(eventName: "mouseDown"): Function[];
473
+ rawListeners(eventName: "mouseDown"): Function[];
474
+ listenerCount(eventName: "mouseDown", listener?: (event: MouseButtonEvent) => void): number;
475
+
476
+ on(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
477
+ once(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
478
+ addListener(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
479
+ prependListener(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
480
+ prependOnceListener(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
481
+
482
+ off(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
483
+ removeListener(eventName: "mouseDown", listener: (event: MouseButtonEvent) => void): this;
484
+ removeAllListeners(eventName: "mouseDown"): this;
485
+
486
+ listeners(eventName: "mouseUp"): Function[];
487
+ rawListeners(eventName: "mouseUp"): Function[];
488
+ listenerCount(eventName: "mouseUp", listener?: (event: MouseButtonEvent) => void): number;
489
+
490
+ on(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
491
+ once(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
492
+ addListener(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
493
+ prependListener(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
494
+ prependOnceListener(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
495
+
496
+ off(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
497
+ removeListener(eventName: "mouseUp", listener: (event: MouseButtonEvent) => void): this;
498
+ removeAllListeners(eventName: "mouseUp"): this;
499
+
500
+ listeners(eventName: "resolution"): Function[];
501
+ rawListeners(eventName: "resolution"): Function[];
502
+ listenerCount(eventName: "resolution", listener?: (width: number, height: number) => void): number;
503
+
504
+ on(eventName: "resolution", listener: (width: number, height: number) => void): this;
505
+ once(eventName: "resolution", listener: (width: number, height: number) => void): this;
506
+ addListener(eventName: "resolution", listener: (width: number, height: number) => void): this;
507
+ prependListener(eventName: "resolution", listener: (width: number, height: number) => void): this;
508
+ prependOnceListener(eventName: "resolution", listener: (width: number, height: number) => void): this;
509
+
510
+ off(eventName: "resolution", listener: (width: number, height: number) => void): this;
511
+ removeListener(eventName: "resolution", listener: (width: number, height: number) => void): this;
512
+ removeAllListeners(eventName: "resolution"): this;
513
+
514
+ listeners(eventName: "keyboardFocus"): Function[];
515
+ rawListeners(eventName: "keyboardFocus"): Function[];
516
+ listenerCount(eventName: "keyboardFocus", listener?: (focus: boolean) => void): number;
517
+
518
+ on(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
519
+ once(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
520
+ addListener(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
521
+ prependListener(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
522
+ prependOnceListener(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
523
+
524
+ off(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
525
+ removeListener(eventName: "keyboardFocus", listener: (focus: boolean) => void): this;
526
+ removeAllListeners(eventName: "keyboardFocus"): this;
527
+ }
528
+
529
+ declare type RenderInterfaceName = "OGG_SIEGE";
530
+
531
+ export interface RenderWindow extends Electron.BrowserWindow {
532
+ getLayer(): number;
533
+ getInput(): boolean;
534
+ getInputBlock(): boolean;
535
+ getCursorOverride(): boolean;
536
+
537
+ setLayer(layer: number): void;
538
+ setInput(input: boolean): void;
539
+ setInputBlock(block: boolean): void;
540
+ setCursorOverride(override: boolean): void;
541
+ }
542
+
543
+ export interface RenderWindowConstructorOptions extends Electron.BrowserWindowConstructorOptions {
544
+ layer?: number; // default: 0
545
+
546
+ createForeground?: boolean; // default: true
547
+
548
+ hasInput?: boolean; // default: true
549
+ hasInputBlock?: boolean; // default: true
550
+ hasCursorOverride?: boolean; // default: true
551
+ }
552
+
553
+ export const enum VirtualKey {
554
+ LeftButton = 0x01,
555
+ RightButton = 0x02,
556
+ Cancel = 0x03,
557
+ MiddleButton = 0x04,
558
+ ExtraButton1 = 0x05,
559
+ ExtraButton2 = 0x06,
560
+ Back = 0x08,
561
+ Tab = 0x09,
562
+ Clear = 0x0c,
563
+ Return = 0x0d,
564
+ Shift = 0x10,
565
+ Control = 0x11,
566
+ Menu = 0x12,
567
+ Pause = 0x13,
568
+ CapsLock = 0x14,
569
+ Kana = 0x15,
570
+ Hangeul = 0x15,
571
+ Hangul = 0x15,
572
+ Junja = 0x17,
573
+ Final = 0x18,
574
+ Hanja = 0x19,
575
+ Kanji = 0x19,
576
+ Escape = 0x1b,
577
+ Convert = 0x1c,
578
+ NonConvert = 0x1d,
579
+ Accept = 0x1e,
580
+ ModeChange = 0x1f,
581
+ Space = 0x20,
582
+ Prior = 0x21,
583
+ Next = 0x22,
584
+ End = 0x23,
585
+ Home = 0x24,
586
+ Left = 0x25,
587
+ Up = 0x26,
588
+ Right = 0x27,
589
+ Down = 0x28,
590
+ Select = 0x29,
591
+ Print = 0x2a,
592
+ Execute = 0x2b,
593
+ Snapshot = 0x2c,
594
+ Insert = 0x2d,
595
+ Delete = 0x2e,
596
+ Help = 0x2f,
597
+ N0 = 0x30,
598
+ N1 = 0x31,
599
+ N2 = 0x32,
600
+ N3 = 0x33,
601
+ N4 = 0x34,
602
+ N5 = 0x35,
603
+ N6 = 0x36,
604
+ N7 = 0x37,
605
+ N8 = 0x38,
606
+ N9 = 0x39,
607
+ A = 0x41,
608
+ B = 0x42,
609
+ C = 0x43,
610
+ D = 0x44,
611
+ E = 0x45,
612
+ F = 0x46,
613
+ G = 0x47,
614
+ H = 0x48,
615
+ I = 0x49,
616
+ J = 0x4a,
617
+ K = 0x4b,
618
+ L = 0x4c,
619
+ M = 0x4d,
620
+ N = 0x4e,
621
+ O = 0x4f,
622
+ P = 0x50,
623
+ Q = 0x51,
624
+ R = 0x52,
625
+ S = 0x53,
626
+ T = 0x54,
627
+ U = 0x55,
628
+ V = 0x56,
629
+ W = 0x57,
630
+ X = 0x58,
631
+ Y = 0x59,
632
+ Z = 0x5a,
633
+ LeftWindows = 0x5b,
634
+ RightWindows = 0x5c,
635
+ Application = 0x5d,
636
+ Sleep = 0x5f,
637
+ Numpad0 = 0x60,
638
+ Numpad1 = 0x61,
639
+ Numpad2 = 0x62,
640
+ Numpad3 = 0x63,
641
+ Numpad4 = 0x64,
642
+ Numpad5 = 0x65,
643
+ Numpad6 = 0x66,
644
+ Numpad7 = 0x67,
645
+ Numpad8 = 0x68,
646
+ Numpad9 = 0x69,
647
+ Multiply = 0x6a,
648
+ Add = 0x6b,
649
+ Separator = 0x6c,
650
+ Subtract = 0x6d,
651
+ Decimal = 0x6e,
652
+ Divide = 0x6f,
653
+ F1 = 0x70,
654
+ F2 = 0x71,
655
+ F3 = 0x72,
656
+ F4 = 0x73,
657
+ F5 = 0x74,
658
+ F6 = 0x75,
659
+ F7 = 0x76,
660
+ F8 = 0x77,
661
+ F9 = 0x78,
662
+ F10 = 0x79,
663
+ F11 = 0x7a,
664
+ F12 = 0x7b,
665
+ F13 = 0x7c,
666
+ F14 = 0x7d,
667
+ F15 = 0x7e,
668
+ F16 = 0x7f,
669
+ F17 = 0x80,
670
+ F18 = 0x81,
671
+ F19 = 0x82,
672
+ F20 = 0x83,
673
+ F21 = 0x84,
674
+ F22 = 0x85,
675
+ F23 = 0x86,
676
+ F24 = 0x87,
677
+ NumLock = 0x90,
678
+ ScrollLock = 0x91,
679
+ NEC_Equal = 0x92,
680
+ Fujitsu_Jisho = 0x92,
681
+ Fujitsu_Masshou = 0x93,
682
+ Fujitsu_Touroku = 0x94,
683
+ Fujitsu_Loya = 0x95,
684
+ Fujitsu_Roya = 0x96,
685
+ LeftShift = 0xa0,
686
+ RightShift = 0xa1,
687
+ LeftControl = 0xa2,
688
+ RightControl = 0xa3,
689
+ LeftMenu = 0xa4,
690
+ RightMenu = 0xa5,
691
+ BrowserBack = 0xa6,
692
+ BrowserForward = 0xa7,
693
+ BrowserRefresh = 0xa8,
694
+ BrowserStop = 0xa9,
695
+ BrowserSearch = 0xaa,
696
+ BrowserFavorites = 0xab,
697
+ BrowserHome = 0xac,
698
+ VolumeMute = 0xad,
699
+ VolumeDown = 0xae,
700
+ VolumeUp = 0xaf,
701
+ MediaNextTrack = 0xb0,
702
+ MediaPrevTrack = 0xb1,
703
+ MediaStop = 0xb2,
704
+ MediaPlayPause = 0xb3,
705
+ LaunchMail = 0xb4,
706
+ LaunchMediaSelect = 0xb5,
707
+ LaunchApplication1 = 0xb6,
708
+ LaunchApplication2 = 0xb7,
709
+ OEM1 = 0xba,
710
+ OEMPlus = 0xbb,
711
+ OEMComma = 0xbc,
712
+ OEMMinus = 0xbd,
713
+ OEMPeriod = 0xbe,
714
+ OEM2 = 0xbf,
715
+ OEM3 = 0xc0,
716
+ OEM4 = 0xdb,
717
+ OEM5 = 0xdc,
718
+ OEM6 = 0xdd,
719
+ OEM7 = 0xde,
720
+ OEM8 = 0xdf,
721
+ OEMAX = 0xe1,
722
+ OEM102 = 0xe2,
723
+ ICOHelp = 0xe3,
724
+ ICO00 = 0xe4,
725
+ ProcessKey = 0xe5,
726
+ ICOClear = 0xe6,
727
+ Packet = 0xe7,
728
+ OEMReset = 0xe9,
729
+ OEMJump = 0xea,
730
+ OEMPA1 = 0xeb,
731
+ OEMPA2 = 0xec,
732
+ OEMPA3 = 0xed,
733
+ OEMWSCtrl = 0xee,
734
+ OEMCUSel = 0xef,
735
+ OEMATTN = 0xf0,
736
+ OEMFinish = 0xf1,
737
+ OEMCopy = 0xf2,
738
+ OEMAuto = 0xf3,
739
+ OEMENLW = 0xf4,
740
+ OEMBackTab = 0xf5,
741
+ ATTN = 0xf6,
742
+ CRSel = 0xf7,
743
+ EXSel = 0xf8,
744
+ EREOF = 0xf9,
745
+ Play = 0xfa,
746
+ Zoom = 0xfb,
747
+ Noname = 0xfc,
748
+ PA1 = 0xfd,
749
+ OEMClear = 0xfe,
750
+ }
751
+
752
+ declare type WarningEvents = WarningInvalidEvent;
753
+
754
+ declare interface WarningInvalidEvent extends ErrorManagerEvent {
755
+ code: "INVALID_EVENT";
756
+ data: {
757
+ summary: string;
758
+ };
759
+ }
760
+
761
+ export interface WindowEvent {
762
+ window?: RenderWindow;
763
+ }
764
+
765
+ export { }