build_tools.syllable_walk_tui.services.config

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:

from build_tools.syllable_walk_tui.services.config import KeybindingConfig, load_keybindings

For the base config without patch_bindings, use tui_common directly:

from build_tools.tui_common.services import KeybindingConfig as BaseKeybindingConfig

Classes

KeybindingConfig

Keybinding configuration for Syllable Walker TUI.

Functions

load_keybindings([config_path])

Load keybindings from config file with fallback to defaults.

Module Contents

class build_tools.syllable_walk_tui.services.config.KeybindingConfig[source]

Bases: 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.

global_bindings

Global actions (quit, help)

tab_bindings

Tab/screen switching (patch_config, blended_walk, analysis)

navigation_bindings

Panel/control navigation (up, down, left, right, etc.)

control_bindings

Control manipulation (activate, increment, decrement)

patch_bindings

Patch operations (generate, copy, paste, reset, swap)

patch_bindings: dict[str, list[str]]
classmethod default()[source]

Create default keybinding configuration for Syllable Walker TUI.

Returns:

KeybindingConfig with sensible defaults including patch bindings

Return type:

KeybindingConfig

get_primary_key(context, action)[source]

Get the primary (first) keybinding for an action.

Extends base class to support ‘patch’ context.

Parameters:
  • context (str) – Keybinding context (“global”, “tabs”, “navigation”, “patch”, etc.)

  • action (str) – Action name (e.g., “quit”, “patch_config”)

Returns:

Primary key string, or None if not found

Return type:

str | None

build_tools.syllable_walk_tui.services.config.load_keybindings(config_path=None)[source]

Load keybindings from config file with fallback to defaults.

This version returns a KeybindingConfig subclass with patch_bindings support.

Parameters:

config_path (pathlib.Path | None) – Optional path to config file

Returns:

KeybindingConfig (user config merged with defaults)

Return type:

KeybindingConfig