Skip to content
Back

Shortcut recorderPro

Record a key combination into caps: held modifiers show as you build it, reserved and taken shortcuts ask first, plus a searchable cheatsheet that lights held keys.

oxyn add shortcut-recorder
Used everywhere in the app
General
Command palette
New thread
Settings
Agent
Stop
Approve
Rewind
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • Let people rebind keys: pick a combination, see it as caps, and be warned before taking one the browser or another command already uses.

When not to use

  • A small turning arc for work that runs right now, plus dots, ray and orbit styles: use Spinner instead.
  • Search and run anything from one field: use Command palette instead.
  • An app sidebar: use Sidebar instead.

Installation

Shortcut recorder is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add shortcut-recorder

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Set

A custom shortcut with Reset.

Used everywhere in the app
General
Command palette
New thread
Settings
Agent
Stop
Approve
Rewind
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Recording

Listening for keys.

Press a shortcut. Esc cancels, Backspace clears.
Recording. Press a shortcut, Escape to cancel
General
Command palette
New thread
Settings
Agent
Stop
Approve
Rewind
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Sequence

G then I.

Used everywhere in the app
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Windows

Ctrl glyphs.

Used everywhere in the app
General
Command palette
New thread
Settings
Agent
Stop
Approve
Rewind
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

ShortcutRecorder

PropTypeDefaultDescription
labelrequiredString—Label.
hide_labelboolDefault::default()Visually hide the label.
valueOption<String>Default::default()Value (`mod+shift+k`).
reset_valueOption<String>Default::default()What reset restores (defaults to the value).
bindingsVec<Binding>Default::default()Shortcuts in use.
warn_reservedbooltrueWarn about reserved combinations.
require_modifierbooltrueRequire a modifier.
platformString"mac"`mac` · `other`.
placeholderString"Record shortcut"Placeholder.
descriptionOption<String>Default::default()Hint.
disabledboolDefault::default()Disabled.
sizeString"md"`sm` · `md`.
sequencesboolDefault::default()Two-key sequences.
recordingboolDefault::default()Start recording.
on_changeEventHandler<(Option<String>, Option<String>)>—Value changed (value, replaced binding label).

ShortcutList

PropTypeDefaultDescription
groupsrequiredVec<ShortcutGroup>—Groups.
labelString"Keyboard shortcuts"Accessible name.
searchablebooltrueSearch field.
highlight_pressedbooltrueLight held caps and fade other rows.
platformString"mac"`mac` · `other`.
widthf32560.0Width px.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EnterorSpaceStart recording
Any combinationRecord it
EscCancel recording
BackspaceorDeleteClear
TabStop and move on

Accessibility

  • A button with aria-pressed while recording, named by the label and the spoken shortcut.
  • Conflicts offer Use anyway and Cancel as real buttons; results are announced.
From the spec

The recorder is a toggle button named by its label and the spoken shortcut ("Command Shift P"). Results, conflicts and cancels are announced. Conflict choices are real buttons.

Motion & interaction

Caps pop in one after another; held modifiers light as they're pressed; the message line opens with a height transition; the recording dot pulses.

Timing
TransitionDurationEasingReduced motion
Caps in180 ms + 40 ms staggerease.outnone
Message260 msease.outinstant
Dot pulse1 s loopease-in-outstatic

Responsive behaviour

  • The cheatsheet goes two columns from 520 px.
Edge cases (spec)

mod is ⌘ on Mac and Ctrl elsewhere; shortcuts written in any order normalise before comparing. Function keys are allowed alone. Recording blurs back to idle.

Notes for AI

  • Import ShortcutRecorder, ShortcutList from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: ShortcutRecorderEl in oxyn_gpui.
  • Props to set first: label, groups.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI