class
AKeyCaptureField
- Module
- Arc
- Header
#include "Arc/Widgets/AKeyCaptureField.h"- Namespace
Arcf
Properties
| Type | Name | Description |
|---|---|---|
ArcDelegate<void(const CInputChord&)> | OnChordCaptured | A captured keyboard chord; an empty chord means Backspace cleared it. |
ArcDelegate<void(const std::string&)> | OnExternalCaptured | A captured mouse or gamepad button, by its cap label. |
ArcDelegate<void()> | OnCaptureCancelled |
Public functions
| Returns | Name | Description |
|---|---|---|
ARC_WIDGET_ARGS | ||
void | SetChord | |
const CInputChord& | GetChord | |
void | SetExternalLabel | A binding that is not a keyboard chord (a mouse or gamepad button), shown as one cap with this label. |
const std::string& | GetExternalLabel | |
void | SetConflict | Names the binding this one collides with; empty clears the conflict. |
void | SetLeadingIcon | A Lucide glyph drawn before the caps — the device the binding reads (keyboard, gamepad, mouse). |
bool | HasConflict | |
void | SetSelected | |
void | BeginCapture | |
void | CancelCapture | |
bool | IsCapturing | |
void | CaptureExternal | Ends a capture with a non-keyboard binding (a gamepad button). |
std::vector<std::string> | Caps | The caps the field shows for its binding ("Ctrl", "Shift", "K"). |
EKeyCapState | GetState | The binding as the key-cap states name it: capturing, conflict, placeholder (nothing bound) or default. |
bool | IsFocusable | |
bool | ConsumesTab | |
bool | OnActivate | |
float | GetFocusRadius | |
bool | CanRetainPaint | The capture prompt pulses on a clock, which a replay would freeze. |
ArcVec2 | ComputeDesiredSize | |
int32_t | OnPaint | |
CReply | OnMouseButtonDown | |
CReply | OnKeyDown | |
void | OnFocusLost | |
const char* | GetTypeName |
Function details
ARC_WIDGET_ARGS
C++
ARC_WIDGET_ARGS(AKeyCaptureField) ARC_ARG(CInputChord, Chord) ARC_ARG(std::string, CapturePrompt) ARC_ARG(std::string, EmptyLabel) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)SetChord
C++
void SetChord(const CInputChord& chord)GetChord
C++
const CInputChord& GetChord() constSetExternalLabel
C++
void SetExternalLabel(const std::string& label)A binding that is not a keyboard chord (a mouse or gamepad button), shown as one cap with this label. SetChord clears it.
GetExternalLabel
C++
const std::string& GetExternalLabel() constSetConflict
C++
void SetConflict(const std::string& conflictsWith)Names the binding this one collides with; empty clears the conflict.
SetLeadingIcon
C++
void SetLeadingIcon(const std::string& glyph)A Lucide glyph drawn before the caps — the device the binding reads (keyboard, gamepad, mouse). Empty draws none.
HasConflict
C++
bool HasConflict() constSetSelected
C++
void SetSelected(bool selected)BeginCapture
C++
void BeginCapture()CancelCapture
C++
void CancelCapture()IsCapturing
C++
bool IsCapturing() constCaptureExternal
C++
void CaptureExternal(const std::string& label)Ends a capture with a non-keyboard binding (a gamepad button).
Caps
C++
std::vector<std::string> Caps() constThe caps the field shows for its binding ("Ctrl", "Shift", "K").
GetState
C++
EKeyCapState GetState() constThe binding as the key-cap states name it: capturing, conflict, placeholder (nothing bound) or default.
IsFocusable
C++
bool IsFocusable() const overrideConsumesTab
C++
bool ConsumesTab() const overrideOnActivate
C++
bool OnActivate() overrideGetFocusRadius
C++
float GetFocusRadius() const overrideCanRetainPaint
C++
bool CanRetainPaint() const overrideThe capture prompt pulses on a clock, which a replay would freeze.
ComputeDesiredSize
C++
ArcVec2 ComputeDesiredSize(float scale) const overrideOnPaint
C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const overrideOnMouseButtonDown
C++
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) overrideOnKeyDown
C++
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) overrideOnFocusLost
C++
void OnFocusLost(const CFocusEvent& event) overrideGetTypeName
C++
const char* GetTypeName() const overrideGenerated from Arc/Widgets/AKeyCaptureField.h via arc.json · Nov 5, 2026Version 1.0.0