Skip to main content

IOverlayHotkey

Electron APIs / Overlay / IOverlayHotkey

Hotkey configuration used by the overlay.

Defines:

  • Main key.
  • Optional modifier keys.
  • Passthrough behavior.

Example

const screenshotHotkey: IOverlayHotkey = {
name: "screenshot",
keyCode: 44, // Print Screen
modifiers: { ctrl: true, alt: true },
passthrough: false,
};

Properties

PropertyTypeDescription
keyCodenumberPrimary key code for the hotkey. Use standard keyboard codes.
modifiers?objectModifier keys that must be pressed along with the main key.
modifiers.alt?booleanUsed for alt ket.
modifiers.ctrl?booleanUsed for ctrl key.
modifiers.custom?numberCustom key binding. Use key code.
modifiers.meta?booleanUse for the windows or command key.
modifiers.shift?booleanUsed for shift key.
namestringUnique name of the hotkey.
passthrough?booleantrue—the hotkey will be passed through to the underlying game. false—the hotkey will be captured exclusively by the overlay.