Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::DetectedShortcut Struct Reference

#include <design_shortcuts.hpp>

Public Attributes

std::string pattern
 Verbatim pattern as it appeared in source — "e.key === 'Escape'", "e.metaKey && e.key === 's'".
std::string key
 Human-readable key name in DOM-spec form: "Escape", "s", "ArrowLeft".
std::vector< std::string > modifiers
 Modifier names normalized to the extractor's emission order: "meta", "ctrl", "alt", "shift".
std::string source_location
 Best-effort source location for the matched pattern, in <file>:<line> form when the input source carries filename hints (Claude bundles do; raw TSX/JS strings don't — caller can pass an empty filename).
std::string handler_excerpt
 Best-effort handler-body excerpt — the first ~80 chars after the condition match.

Member Data Documentation

◆ handler_excerpt

std::string pulp::view::DetectedShortcut::handler_excerpt

Best-effort handler-body excerpt — the first ~80 chars after the condition match.

Surfaced in the manifest so a reviewer can decide whether the shortcut is safe to auto-wire vs needs human triage.

◆ key

std::string pulp::view::DetectedShortcut::key

Human-readable key name in DOM-spec form: "Escape", "s", "ArrowLeft".

Empty if the pattern's key reference couldn't be resolved (e.g. the handler dispatches on a runtime variable instead of a literal).

◆ modifiers

std::vector<std::string> pulp::view::DetectedShortcut::modifiers

Modifier names normalized to the extractor's emission order: "meta", "ctrl", "alt", "shift".

The cross-platform e.metaKey || e.ctrlKey idiom emits both meta and ctrl so codegen can bind Cmd and Ctrl as distinct physical chords.

◆ pattern

std::string pulp::view::DetectedShortcut::pattern

Verbatim pattern as it appeared in source — "e.key === 'Escape'", "e.metaKey && e.key === 's'".

Preserved for the manifest so a reviewer can audit the match without re-grepping source.

◆ source_location

std::string pulp::view::DetectedShortcut::source_location

Best-effort source location for the matched pattern, in <file>:<line> form when the input source carries filename hints (Claude bundles do; raw TSX/JS strings don't — caller can pass an empty filename).


The documentation for this struct was generated from the following file: