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