Provides type definitions and symbol/label mappings for keyboard keys used by the Kbd UI component, enabling consistent display of shortcuts across the React library.
// Source: https://github.com/heroui-inc/heroui | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
export type KbdKey =
| "command"
| "shift"
| "ctrl"
| "option"
| "enter"
| "delete"
| "escape"
| "tab"
| "capslock"
| "up"
| "right"
| "down"
| "left"
| "pageup"
| "pagedown"
| "home"
| "end"
| "help"
| "space"
| "fn"
| "win"
| "alt";
export const kbdKeysMap: Record<KbdKey, string> = {
command: "⌘",
shift: "⇧",
ctrl: "⌃",
option: "⌥",
enter: "↵",
delete: "⌫",
escape: "⎋",
tab: "⇥",
capslock: "⇪",
up: "↑",
right: "→",
down: "↓",
left: "←",
pageup: "⇞",
pagedown: "⇟",
home: "↖",
end: "↘",
help: "?",
space:
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key