• Back to Glue42 Enterprise Docs
Glue42 enterprise documentation

Reference Documentation

  • Back to Glue42 Enterprise Docs
Press/
  • Glue
  • Application Preferences
  • AppManager
  • Channels
  • Connection
  • Cookies
  • Displays
  • Hotkeys
  • Intents
  • Interop
  • Layouts
  • Logger
  • Metrics
  • Notifications
  • Pub Sub
  • Shared Contexts
  • Themes
  • Windows
  • Workspaces

Hotkeys

5.19.0

The Hotkeys API allows applications to register key combinations and receive notifications when a key combination is pressed by the user irrespective of whether the application is on focus or not. Hotkeys is useful for web applications that do not have access to system resources and cannot register global shortcuts.

The Hotkeys API is accessible through the glue.hotkeys object.

APIobject

Description

Hotkeys API

Available since version Glue42 JavaScript 4.3.5

Methods

  • isRegistered
  • register
  • unregister
  • unregisterAll

isRegisteredmethod

Signature

(hotkey: string) => void

Description

Returns true if the current application has registered a hotkey.

Parameters

Name Type Required Description
hotkey string

The hotkey you want to check for.

registermethod

Signature

(hotkey: string | HotkeyInfo, callback: HotkeyCallback) => Promise<void>

Description

Registers a hotkey. Note that the same hotkey can be registered just once.

Parameters

Name Type Required Description
hotkey string | HotkeyInfo

The key or key combination (as a string or as a HotkeyInfo object) that will be registered.

callback HotkeyCallback

Callback function that will be invoked when the hotkey is activated.

unregistermethod

Signature

(hotkey: string) => Promise<void>

Description

Unregisters a hotkey. Notifications will no longer be received about this hotkey.

Parameters

Name Type Required Description
hotkey string

The hotkey to unregister.

unregisterAllmethod

Signature

() => Promise<void>

Description

Unregister all hotkeys registered by the current application.

HotkeyInfoobject

Description

Information about the hotkey.

Properties

Property Type Default Required Description
description string

Description of the hotkey.

hotkey string

The key or key combination that will be used as a hotkey.

HotkeyCallbackfunction

Signature

() => void

Description

Callback function that is invoked when the hotkey is activated.

  • © 2023 Glue42
  • Home
  • Privacy policy
  • Contact Sales
  • Glue42.com
  • Tick42.com
  • Overview
  • API
  • HotkeyInfo
  • HotkeyCallback
Navigate
Go