#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. | |
| 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.
| 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).
| 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.
| 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.
| 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).