KeyboardShortcut
A keyboard shortcut: a row of keycaps, each a small raised box with a border around one key's name. It takes nothing.


Fixtures: keyboard-shortcut-chord and keyboard-shortcut-single.
Build
public static Box Build(BibuiRuntime runtime, params ReadOnlySpan<string> keys)
public const float KeyHeight = 24f;| Parameter | Meaning |
|---|---|
keys | One keycap per key, in order, 4 px apart. |
The row is as wide as its keycaps and 24 px tall.
Claims and reports
None. It returns a keyless Box.
State the caller owns
None.
Theme tokens
- Keycap: a
SurfaceRaisedfill and aBorderedgeruntime.Theme.Borders.Widthwide. - Key name:
TextColor.Primary, at the small size.
Example
using Bibui.Core;
using Bibui.Core.Runtime;
sealed class CommandPaletteHint
{
const string Ctrl = "Ctrl";
const string Shift = "Shift";
const string P = "P";
public UiNode Build(BibuiRuntime runtime) => KeyboardShortcut.Build(runtime, Ctrl, Shift, P);
}