Skip to content

ElectronGlobalShortcut.registerAll method

ElectronGlobalShortcut › registerAll

Unofficial

Registers a global shortcut of all accelerator items in accelerators. The callback is called when any of the registered shortcuts are pressed by the user.

When a given accelerator is already taken by other applications, this call will silently fail.

Signature:

registerAll(accelerators: string[], callback: () => void): void

Parameters:

ParameterTypeDescription
acceleratorsstring[]The accelerators to register.
callback() => voidCalled when any of the registered shortcuts is pressed.

Returns: void