KeyboardShortcuts
uitemplate
A group of bindings belonging to the same category
Terminal
$termuijs render keyboard-shortcuts
Installation
$ bunx termuijs add keyboard-shortcuts
Copies the source into src/components/keyboard-shortcuts/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { KeyboardShortcuts } from '@termuijs/ui'ts
new KeyboardShortcuts(bindings: ShortcutBinding[], options: KeyboardShortcutsOptions = {})API Reference
KeyboardShortcuts
| Prop | Type | Required | Description |
|---|---|---|---|
bindings | ShortcutBinding[] | required | — |
keyColor | Style['fg'] | optional | Color for the key label boxes |
categoryColor | Style['fg'] | optional | Color for category headings |
columns | number | optional | Number of columns (default 2) |
showCategories | boolean | optional | Show category headings (default true) |