class

CArcCommandSystem

Global command registry and keybind manager

Module
Arc
Header
#include "Arc/Commands/CArcCommandSystem.h"
Namespace
Arcf

Public functions

ReturnsNameDescription
CArcCommandSystem&Get
voidRegisterCommandRegister a command (action bound separately via command lists)
boolRegisterCommandRegister command + parse chord + bind the callback in the global list.
const CArcUICommand*FindCommand
const CArcUICommand*FindCommandByChordThe first of FindCommandsByChord, by command id.
std::vector<const CArcUICommand*>FindCommandsByChordEvery command bound to the chord (primary or secondary), sorted by id so resolution never depends on hash order.
boolRemapCommand
boolRemapCommand
voidResetToDefault
voidResetAllToDefaults
voidPushCommandListMost recently pushed list is consulted first
voidPopCommandList
CArcCommandList&GetGlobalCommandListAlways-active fallback list, consulted after all pushed lists
boolHandleKeyKey-path entry point: executes the command bound to this chord
boolExecuteCommandExecute by id: pushed lists (most specific first), then the global list
std::stringGetChordDisplayString"Ctrl+Shift+P" for the command's active chord; empty if unknown/unbound
std::vector<const CArcUICommand*>GetAllCommands

Function details

Get

C++
static CArcCommandSystem& Get()

RegisterCommand

C++
void RegisterCommand(const CArcUICommand& command)

Register a command (action bound separately via command lists)

RegisterCommand

C++
bool RegisterCommand(const std::string& id, const std::string& chord, std::function<void()> callback, const std::string& label = std::string())

Register command + parse chord + bind the callback in the global list. Returns false (and registers nothing) if the chord string does not parse; an empty chord string registers a command with no keybind.

FindCommand

C++
const CArcUICommand* FindCommand(const CName& id) const

FindCommandByChord

C++
const CArcUICommand* FindCommandByChord(const CInputChord& chord) const

The first of FindCommandsByChord, by command id.

FindCommandsByChord

C++
std::vector<const CArcUICommand*> FindCommandsByChord(const CInputChord& chord) const

Every command bound to the chord (primary or secondary), sorted by id so resolution never depends on hash order.

RemapCommand

C++
bool RemapCommand(const CName& commandId, const CInputChord& newChord)

RemapCommand

C++
bool RemapCommand(const CName& commandId, const CInputChord& newChord, bool secondary)

ResetToDefault

C++
void ResetToDefault(const CName& commandId)

ResetAllToDefaults

C++
void ResetAllToDefaults()

PushCommandList

C++
void PushCommandList(CArcCommandList* list)

Most recently pushed list is consulted first

PopCommandList

C++
void PopCommandList()

GetGlobalCommandList

C++
CArcCommandList& GetGlobalCommandList()

Always-active fallback list, consulted after all pushed lists

HandleKey

C++
bool HandleKey(EKey key, EModifierKey modifiers)

Key-path entry point: executes the command bound to this chord

ExecuteCommand

C++
bool ExecuteCommand(const CName& commandId)

Execute by id: pushed lists (most specific first), then the global list

GetChordDisplayString

C++
std::string GetChordDisplayString(const CName& commandId) const

"Ctrl+Shift+P" for the command's active chord; empty if unknown/unbound

GetAllCommands

C++
std::vector<const CArcUICommand*> GetAllCommands() const
Generated from Arc/Commands/CArcCommandSystem.h via arc.json · Nov 5, 2026Version 1.0.0