Skip to main content

useHotkey API

This hook can be used to register a global hotkey. It makes use of Finsemble's HotkeyClient API.

Parameters

ParameterTypeSummary
keyCombinationArray<string>A hotkey combination. If null or undefined then no operation will occur.
actionFunctionThe function to be called when the hotkey combination is pressed.

useHotkey returns void.

Usage

useHotkey(["ctrl", "alt", "shift", "r"], () => FSBL.restartApplication());