class

AKeyCaptureField

Module
Arc
Header
#include "Arc/Widgets/AKeyCaptureField.h"
Namespace
Arcf

Properties

TypeNameDescription
ArcDelegate<void(const CInputChord&)>OnChordCapturedA captured keyboard chord; an empty chord means Backspace cleared it.
ArcDelegate<void(const std::string&)>OnExternalCapturedA captured mouse or gamepad button, by its cap label.
ArcDelegate<void()>OnCaptureCancelled

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGS
voidSetChord
const CInputChord&GetChord
voidSetExternalLabelA binding that is not a keyboard chord (a mouse or gamepad button), shown as one cap with this label.
const std::string&GetExternalLabel
voidSetConflictNames the binding this one collides with; empty clears the conflict.
voidSetLeadingIconA Lucide glyph drawn before the caps — the device the binding reads (keyboard, gamepad, mouse).
boolHasConflict
voidSetSelected
voidBeginCapture
voidCancelCapture
boolIsCapturing
voidCaptureExternalEnds a capture with a non-keyboard binding (a gamepad button).
std::vector<std::string>CapsThe caps the field shows for its binding ("Ctrl", "Shift", "K").
EKeyCapStateGetStateThe binding as the key-cap states name it: capturing, conflict, placeholder (nothing bound) or default.
boolIsFocusable
boolConsumesTab
boolOnActivate
floatGetFocusRadius
boolCanRetainPaintThe capture prompt pulses on a clock, which a replay would freeze.
ArcVec2ComputeDesiredSize
int32_tOnPaint
CReplyOnMouseButtonDown
CReplyOnKeyDown
voidOnFocusLost
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() const

SetExternalLabel

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() const

SetConflict

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() const

SetSelected

C++
void SetSelected(bool selected)

BeginCapture

C++
void BeginCapture()

CancelCapture

C++
void CancelCapture()

IsCapturing

C++
bool IsCapturing() const

CaptureExternal

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() const

The caps the field shows for its binding ("Ctrl", "Shift", "K").

GetState

C++
EKeyCapState GetState() const

The binding as the key-cap states name it: capturing, conflict, placeholder (nothing bound) or default.

IsFocusable

C++
bool IsFocusable() const override

ConsumesTab

C++
bool ConsumesTab() const override

OnActivate

C++
bool OnActivate() override

GetFocusRadius

C++
float GetFocusRadius() const override

CanRetainPaint

C++
bool CanRetainPaint() const override

The capture prompt pulses on a clock, which a replay would freeze.

ComputeDesiredSize

C++
ArcVec2 ComputeDesiredSize(float scale) const override

OnPaint

C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const override

OnMouseButtonDown

C++
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) override

OnKeyDown

C++
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) override

OnFocusLost

C++
void OnFocusLost(const CFocusEvent& event) override

GetTypeName

C++
const char* GetTypeName() const override
Generated from Arc/Widgets/AKeyCaptureField.h via arc.json · Nov 5, 2026Version 1.0.0