Skip to main content

Function: comboText()

comboText(combo, platform?): string

Defined in: src/lib/utils/shortcuts/index.ts:599

A key combination as words, e.g. for a text field: modifiers in the order shift, alt, cmd, ctrl, then the key (Space as space). "cmd" is written ctrl except on Apple devices.

Parameters​

combo​

KeyCombo

platform?​

string

Returns​

string

Example​

comboText({ key: "g", shift: true, alt: true, cmd: true, ctrl: true }, "MacIntel"); // "shift alt cmd ctrl g"
comboText({ key: "s", cmd: true }, "Win32"); // "ctrl s"
comboText({ key: "", shift: true }, "MacIntel"); // "shift" (modifiers only)