GlobalShortcut

external interface GlobalShortcut(source)

Functions

Link copied to clipboard
abstract fun isRegistered(accelerator: String): Boolean

Whether this application has registered accelerator.

Link copied to clipboard
abstract fun register(accelerator: String, callback: () -> Unit): Boolean

Whether or not the shortcut was registered successfully.

Link copied to clipboard
abstract fun registerAll(accelerators: ERROR CLASS: Symbol not found for js.array.ReadonlyArray<kotlin/String>, callback: () -> Unit)

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.

Link copied to clipboard
abstract fun unregister(accelerator: String)

Unregisters the global shortcut of accelerator.

Link copied to clipboard
abstract fun unregisterAll()

Unregisters all of the global shortcuts.