Core components of ShortcutRecorder
masterThe framework provides several specialized classes to handle different parts of the shortcut lifecycle:
- UI & Capture:
SRRecorderControlis used to render the recording interface and capture user input. - Styling:
SRRecorderControlStyleallows for custom visual styles. - Data Model:
SRShortcutrepresents the actual shortcut model. - Global Monitoring:
SRGlobalShortcutMonitor: Registers a global hotkey to turn a shortcut into an action.SRAXGlobalShortcutMonitor: Uses macOS Accessibility to handle any kind of keyboard event.
- Local Monitoring:
SRLocalShortcutMonitorhandles events manually within the responder chain or viaNSEventmonitors. - Integration & Validation:
SRShortcutController: Provides smooth Cocoa Bindings and Interface Builder integration.SRShortcutValidator: Validates shortcuts against Cocoa key equivalents and global hot keys.
- Formatting: Includes
NSValueTransformerandNSFormattersubclasses for custom data alterations.