build_tools.syllable_walk_tui.services.config ============================================= .. py:module:: build_tools.syllable_walk_tui.services.config .. autoapi-nested-parse:: Configuration management for Syllable Walker TUI. This module extends the base ``tui_common.KeybindingConfig`` with syllable_walk-specific functionality, particularly the ``patch_bindings`` attribute for patch operations (generate, copy, paste, reset, swap). This is **not** a deprecated re-export - it provides genuine extensions to the base config. Import from here when working with syllable_walk_tui: .. code-block:: python from build_tools.syllable_walk_tui.services.config import KeybindingConfig, load_keybindings For the base config without patch_bindings, use tui_common directly: .. code-block:: python from build_tools.tui_common.services import KeybindingConfig as BaseKeybindingConfig Classes ------- .. autoapisummary:: build_tools.syllable_walk_tui.services.config.KeybindingConfig Functions --------- .. autoapisummary:: build_tools.syllable_walk_tui.services.config.load_keybindings Module Contents --------------- .. py:class:: KeybindingConfig Bases: :py:obj:`build_tools.tui_common.services.config.KeybindingConfig` Keybinding configuration for Syllable Walker TUI. This is a backward-compatible subclass that adds the ``patch_bindings`` attribute expected by the syllable_walk_tui codebase. .. attribute:: global_bindings Global actions (quit, help) .. attribute:: tab_bindings Tab/screen switching (patch_config, blended_walk, analysis) .. attribute:: navigation_bindings Panel/control navigation (up, down, left, right, etc.) .. attribute:: control_bindings Control manipulation (activate, increment, decrement) .. attribute:: patch_bindings Patch operations (generate, copy, paste, reset, swap) .. py:attribute:: patch_bindings :type: dict[str, list[str]] .. py:method:: default() :classmethod: Create default keybinding configuration for Syllable Walker TUI. :returns: KeybindingConfig with sensible defaults including patch bindings .. py:method:: get_primary_key(context, action) Get the primary (first) keybinding for an action. Extends base class to support 'patch' context. :param context: Keybinding context ("global", "tabs", "navigation", "patch", etc.) :param action: Action name (e.g., "quit", "patch_config") :returns: Primary key string, or None if not found .. py:function:: load_keybindings(config_path = None) Load keybindings from config file with fallback to defaults. This version returns a KeybindingConfig subclass with patch_bindings support. :param config_path: Optional path to config file :returns: KeybindingConfig (user config merged with defaults)