The GlobalHotkey module can register/unregister a global hotkeys.

Namespace

Hierarchy

Constructors

Properties

addListener: (<EventType>(eventType: EventType, listener: EventHandler<OpenFin.GlobalHotkeyEvents.GlobalHotkeyEvent, EventType>, options?: SubscriptionOptions) => Promise<GlobalHotkey>) = ...

Type declaration

wire: Transport<EntityType>

Accessors

Methods

  • Type Parameters

    • EventType extends string

    Parameters

    • eventType: EventType
    • payload: Extract<EmitterEvent, {
          type: EventType;
      }>
    • Rest ...args: any[]

    Returns boolean

  • Returns (string | symbol)[]

  • Checks if a given hotkey has been registered

    Returns

    Tutorial

    GlobalHotkey.isRegistered

    Parameters

    • hotkey: string

      a hotkey string

    Returns Promise<boolean>

  • Parameters

    • type: string | symbol

    Returns number

  • Parameters

    • type: string | symbol

    Returns Function[]

  • Registers a global hotkey with the operating system.

    Returns

    Tutorial

    GlobalHotkey.register

    Parameters

    • hotkey: string

      a hotkey string

    • listener: ((...args: any[]) => void)

      called when the registered hotkey is pressed by the user.

        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns Promise<void>

  • Parameters

    • Optional eventType: "registered" | "unregistered"

    Returns Promise<GlobalHotkey>

  • Unregisters a global hotkey with the operating system.

    Returns

    Tutorial

    GlobalHotkey.unregister

    Parameters

    • hotkey: string

      a hotkey string

    Returns Promise<void>

  • Unregisters all global hotkeys for the current application.

    Returns

    Tutorial

    GlobalHotkey.unregisterAll

    Returns Promise<void>

Generated using TypeDoc