Format for Display API Reference

formatHotkey

Function: formatHotkey()

ts
function formatHotkey(parsed): string;

Defined in: format.ts:23

Converts a ParsedHotkey back to a hotkey string.

Parameters

parsed

ParsedHotkey

The parsed hotkey object

Returns

string

A hotkey string in canonical form

Example

ts
formatHotkey({ key: 'S', ctrl: true, shift: true, alt: false, meta: false, modifiers: ['Control', 'Shift'] })
// Returns: 'Control+Shift+S'