• Back to io.Connect Desktop docs
io.Connect Desktop Documentation

API Reference Documentation

  • Back to io.Connect Desktop docs
Press/
  • io.Connect Desktop
  • App Management
  • App Preferences
  • Channels
  • Cookies
  • Displays
  • Hotkeys
  • Intents
  • Interception
  • Interop
  • Layouts
  • Logger
  • Metrics
  • Notifications
  • Pub Sub
  • Search
  • Shared Contexts
  • Themes
  • Windows
  • Workspaces

Hotkeys

6.13.0

The Hotkeys API allows apps to register key combinations and receive notifications when a key combination is pressed by the user regardless of whether or not the app is on focus. Hotkeys are useful for web apps that don't have access to system resources and can't register global shortcuts.

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

APIobject

Description

Hotkeys API.

Methods

  • isRegistered
  • register
  • unregister
  • unregisterAll

isRegisteredmethod

Signature

(hotkey: string) => void

Description

Whether the current app has registered a hotkey.

Parameters

Name Type Required Description
hotkey string

The name of the hotkey you want to check.

registermethod

Signature

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

Description

Registers a hotkey. All registered hotkeys within the framework must be unique.

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

Unregisters all hotkeys registered by the current app.

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.

  • Home
  • Privacy policy
  • Contact Us
  • interop.io
  • Overview
  • API
  • HotkeyInfo
  • HotkeyCallback
Navigate
Go