GlobalShortcut

external interface GlobalShortcut(source)

Functions

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

Whether this application has registered accelerator.

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

Whether or not the shortcut was registered successfully.

Link copied to clipboard
abstract fun registerAll(accelerators: ReadonlyArray<Accelerator>, 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: Accelerator)

Unregisters the global shortcut of accelerator.

Link copied to clipboard
abstract fun unregisterAll()

Unregisters all of the global shortcuts.