Raxol.Core.KeyboardShortcutsBehaviour behaviour (Raxol v2.0.1)
View SourceBehavior for KeyboardShortcuts implementation.
This defines the expected interface for keyboard shortcuts functionality used by the UX refinement system.
Summary
Callbacks
Clean up the keyboard shortcuts system.
Get available shortcuts for the current context.
Get shortcuts for a specific context.
Handle keyboard events.
Initialize the keyboard shortcuts system.
Register a keyboard shortcut with callback.
Set the current shortcuts context.
Show shortcuts help.
Callbacks
@callback cleanup() :: :ok | {:error, term()}
Clean up the keyboard shortcuts system.
@callback get_available_shortcuts() :: [map()]
Get available shortcuts for the current context.
Get shortcuts for a specific context.
Handle keyboard events.
@callback init() :: :ok | {:error, term()}
Initialize the keyboard shortcuts system.
@callback register_shortcut( shortcut_key :: String.t(), name :: String.t(), callback :: function(), opts :: Keyword.t() ) :: :ok | {:error, term()}
Register a keyboard shortcut with callback.
Set the current shortcuts context.
Show shortcuts help.