Components
- Accordion
- Alert
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Carousel
- Checkbox
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Data Table
- Date Picker
- Description List
- Dropdown Button
- Empty
- Form
- Group Box
- Hover Card
- Icon
- Image
- Input
- Input Group
- Kbd
- Label
- Link
- List
- Marker
- Menu
- Message
- Notification
- Number Input
- Pagination
- Popover
- Progress
- Progress Circle
- Radio
- Rating
- Resizable
- Scrollable
- Select
- Separator
- Sheet
- Shimmer
- Sidebar
- Skeleton
- Slider
- Spinner
- Status Bar
- Stepper
- Switch
- Table
- Tabs
- Tag
- Textarea
- Time Field
- Title Bar
- Toggle
- Toggle Group
- Toolbar
- Tooltip
- Tree
- Virtual List
A key cap for keyboard shortcuts, written as GPUI Kit writes them on each platform.
New control
Interactive



<StackPanel Spacing="12" HorizontalAlignment="Left">
<StackPanel Orientation="Horizontal" Spacing="6">
<TextBlock Text="Press" VerticalAlignment="Center" />
<gpui:Kbd Gesture="Ctrl+K" VerticalAlignment="Center" />
<TextBlock Text="to search" VerticalAlignment="Center" />
</StackPanel>
<WrapPanel ItemSpacing="8" LineSpacing="8">
<gpui:Kbd Gesture="A" />
<gpui:Kbd Gesture="F12" />
<gpui:Kbd Gesture="Tab" />
<gpui:Kbd Gesture="Space" />
<gpui:Kbd Gesture="PageDown" />
<gpui:Kbd Gesture="Ctrl+Shift+P" />
</WrapPanel>
</StackPanel>Usage
gpui:Kbd shows its Gesture (a KeyGesture, such as Ctrl+Shift+P) in muted 12px text on a key cap at least 20px wide with 4×2 padding. The text follows GPUI Kit's notation on the running platform: on macOS the modifier symbols without a separator (⌃ ⌥ ⇧ ⌘, with ⏎ and ⎋ for Enter and Escape), elsewhere the names joined by "+" (Ctrl, Alt, Shift, Win). Classes="outline" draws the cap on the background with a 1px border.
Examples
outline on single keys and on a chord.
Interactive



<WrapPanel ItemSpacing="8" LineSpacing="8">
<gpui:Kbd Classes="outline" Gesture="A" />
<gpui:Kbd Classes="outline" Gesture="F12" />
<gpui:Kbd Classes="outline" Gesture="Enter" />
<gpui:Kbd Classes="outline" Gesture="Ctrl+K" />
</WrapPanel>Not covered
- Resolving the keys from an Action; write the key names.