Keyboard functions
Functions related to the keyboard
- Source:
keyboard.utils.ts
formatShortcut(shortcut)
Formats a shortcut (combination of keys) into a human-readable format.
For a list of valid key values, refer to this page: Key values for keyboard events - Web APIs | MDN
Parameters
- shortcut - A list of keys
- Type:
string[]
- Type:
Returns
- Type:
string
Example
ts
formatShortcut(["Control", "a"])
// Result: "Ctrl+A"