Skip to content

KeyRecorder

Shortcut field: press records (start), blur stops (stop); keys then fire key {type: down|up|modifiers|mouse, key, button, ctrl, alt, shift, meta}.

Group: Inputs · Kind: macro

example
Ctrl
Space
value
Ctrl
Space
empty
None
recording
Press any key or combination…
recording · held modifier
Ctrl
…
error
Press any key or combination…
Hold Ctrl, Alt, Shift or Super with that key

Open in the playground

The same specimen painted by React, SwiftUI, Compose and gpui.

exponential-ui-key-recorder on Web
exponential-ui-key-recorder on iOS
exponential-ui-key-recorder on Android
exponential-ui-key-recorder on Desktop
Prop Type Required Bindable Description
label string yes – The accessible name.
value [string] – yes The recorded keys, one cap each.
recording boolean – yes Listening for keys; bind it. Default false.
pending [string] – yes Held modifiers.
placeholder string – – Shown while recording with no key held.
error string – – Under the field.
  • on.start: runs an action
  • on.stop: runs an action
  • on.key: runs an action

None.

none

No basic catalog component maps here.

Box · KbdGroup · Text

Role: group

field = button named label, aria-pressed while recording; the error line is an alert

Keys Action
Enter Space start recording
– While recording every key, modifier change and mouse button 3-5 goes to key; Tab and Escape included (the host decides)

Recipe parts: KeyRecorder/root KeyRecorder/field KeyRecorder/none KeyRecorder/value KeyRecorder/placeholder KeyRecorder/held KeyRecorder/pending KeyRecorder/ellipsis KeyRecorder/error

Keyed by: recording :hover :pressed :focus :disabled :checked :open :selected :invalid :dragover :warning :info

Themes · Write a theme

KbdGroup · Text · Form · FieldGroup · FormActions · SettingsRow · Input · Textarea