Skip to content

Modals & Complete Shortcut Reference

cspa-tui-demo includes two full-featured interactive overlay modals (Add Capture Sources and OS Recording Permissions & Consent), mutually exclusive so keyboard navigation stays unambiguous.


1. Modal A — Add Capture Sources ( A A A )

Section titled “1. Modal A — Add Capture Sources ()”

Opening Add Capture Sources starts a bounded 256-event DiscoverySubscription matching the active modal filters so newly launched apps, plugged-in USB headsets, and PLAYING ↔\leftrightarrow IDLE state transitions update live without manual refreshes.

  • 4 Live Category Tabs (click tab or cycle with Tab Tab Tab — SwitchModalTab):
    1. Apps (Tree) (ModalTab::Applications): Top-level desktop applications with child audio helpers rolled up automatically.
    2. Processes (ModalTab::Processes): Individual OS processes (PID + executable path).
    3. Output Devs (ModalTab::OutputDevices): 🔊 DEFAULT (Default System Output) + named 🔈 ENDPOINT render devices.
    4. Microphones (ModalTab::Microphones): 🎤 DEFAULT (Default Microphone) + physical/virtual 🎙 MIC IN endpoints (.monitor loopback sinks excluded).
  • Search & Quick Filters:
    • Search (/): [ ..._ ] ( Slash Slash Slash or click to focus FocusModalSearch; type to filter by name, PID, app ID, or path; Enter Enter Enter or Escape Escape Escape unfocuses search; [Clear] resets via ClearModalSearch).
    • [x] AudioOnly(F) ( F F F or click, ToggleModalAudioOnly) — hides non-audio background processes.
    • [x] PlayingOnly(P) ( P P P or click, ToggleModalPlayingOnly) — filters to applications/processes actively outputting audio right now (🔊 PLAYING).
    • [Refresh] (click, RefreshModalDiscovery) — forces an immediate OS inventory rescan.
  • [Backend: All (B)] ( B B B or click, CycleModalBackendFilter) — cycles All →\rightarrow individual OS backends (WASAPI, PW, PA, CA, SCK).
  • [Dedupe: Logical / PerBackend (U)] ( U U U or click, ToggleModalDedupe) — switches between ByLogicalTarget deduplication and raw <backend>:<kind>:... PerBackend rows.
  • [Order: Kind->Bk / Bk->Kind (O)] ( O O O or click, ToggleModalOrder) — toggles KindThenBackend vs BackendThenKind sorting.
Section titled “Candidate List, Contextual Consent Pill & Mouse Hover Inspector”
  • Multi-Select: Move cursor with ArrowUp ArrowUp ArrowUp / ArrowDown ArrowDown ArrowDown , toggle [x] with Space Space Space or mouse click (ToggleModalCandidate), and press Enter Enter Enter or click [ + Add N Selected (Enter) ] (ConfirmAddModalCandidates). Pressing Enter Enter Enter with 0 boxes checked automatically adds the highlighted cursor row!
  • Mouse Hover Metadata Popup: Hovering the mouse cursor over any candidate row opens a floating rounded inspector card showing untruncated Name, canonical Target ID, Pinned & Available backends, App ID / Device ID, PID + start_time generation, wrapped Path, default policy, and live OS Permission status!
  • Active-Tab Consent Pill ( G G G ): Displays [Perm Mic/SysAudio/ScreenRec: OK (K)], [Grant ... (G)] (requests consent for that tab’s permission domain in the background!), or [...:Settings (G)] (opens OS Privacy Settings when denied).

Section titled “2. Modal B — OS Recording Permissions & Consent ()”

Backed by a non-blocking single-flight PermissionRunner so the 30 FPS UI never freezes while macOS TCC or OS Settings dialogs are open:

  • Header Controls:
    • [Policy: AutoRequest / CheckOnly (P)] ( P P P or click, TogglePermissionPolicy) — sets CaptureRequest::with_permission_policy(...).
    • [x] Open OS Settings on Denial (O) ( O O O or click, ToggleOpenSettingsFallback) — controls open_settings_if_denied when requesting permissions.
    • [Close (Esc)] ( Escape Escape Escape or K K K , ClosePermissionsModal).
  • Global Actions:
    • [Re-Check States (C)] ( C C C or click, RefreshPermissions) — runs non-prompting check_permissions.
    • [ Request Required for Staged (R / Enter) ] ( R R R , Enter Enter Enter , or click, RequestRequiredPermissions) — prompts for all consent domains required by currently checked staged sources.
  • Per-Domain Consent Table ( 1 1 1 , 2 2 2 , 3 3 3 ):
    • Row 1 (Microphone), Row 2 (SystemAudio), Row 3 (ScreenRecording): shows * REQUIRED vs optional, 5-state State (GRANTED, NOT DETERMINED, DENIED, RESTRICTED, UNKNOWN (Unprobed)), Prompt, Relaunch, and context-sensitive action button ([Ask OS (1..3)], [Probe (2)] for unprobed macOS 14.2+ Core Audio taps, or [Settgs (1..3)] via RequestDomainPermission / OpenDomainSettings), followed by platform-specific diagnostic guidance for Windows (ConsentStore / GPO), macOS (Info.plist, SSH console, TCC relaunch), and Linux (PipeWire/PulseAudio sockets & Flatpak).

Shortcut Action
A A A Open Add Capture Sources modal (OpenAddSourceModal)
K K K Open OS Recording Permissions & Consent modal (OpenPermissionsModal)
R R R Start or stop recording into a RAM MemoryTake (ToggleRecordStop)
S S S Stop active recording, or stop active take playback (StopPlayback)
P P P Play or pause the selected RAM MemoryTake (PlayPauseSelectedTake)
W W W Export the selected MemoryTake to ./recordings/*.wav (SaveSelectedTakeWav)
V V V Cycle [3] Live Spectroscope mode (FFT Spectrum →\rightarrow Waterfall Map →\rightarrow Oscilloscope)
M M M Toggle visual live monitoring ON / OFF (ToggleLiveMonitor)
T T T Toggle synthetic multi-tone signal generator ON / OFF (ToggleSyntheticSignal)
C C C Cycle session CombineMode (Auto →\rightarrow NativeOnly →\rightarrow CspaMixer)
ArrowUp ArrowUp ArrowUp / ArrowDown ArrowDown ArrowDown Move selection cursor > in [1] Staged Audio Sources
Space Space Space Enable / disable the selected staged source row (live hot-swap!)
B B B Cycle pinned backend on the selected staged source (CycleStagedBackend)
G G G Cycle static gain (1.0x, 0.5x, 1.5x, 0.25x) on the selected staged source (CycleStagedGain)
D D D Duplicate (+2x) the selected staged source (DuplicateStagedSource)
Delete Delete Delete / Backspace Backspace Backspace Remove the selected staged source row (RemoveStagedSource)
Left Square Bracket Left Square Bracket Left Square Bracket / Right Square Bracket Right Square Bracket Right Square Bracket Select previous / next recorded MemoryTake in Panel [5]
ArrowLeft ArrowLeft ArrowLeft / ArrowRight ArrowRight ArrowRight Seek playback -5% / +5% in the selected MemoryTake
Q Q Q / Control + C Control + C Control + C Exit cspa-tui-demo cleanly

Add Capture Sources Modal ( A A A )

Section titled “Add Capture Sources Modal ()”
Shortcut Action
Tab Tab Tab Cycle modal tabs (Apps (Tree) →\rightarrow Processes →\rightarrow Output Devs →\rightarrow Microphones)
Slash Slash Slash Focus live search box (Enter or Esc exits search input)
F F F Toggle [x] AudioOnly(F) filter
P P P Toggle [x] PlayingOnly(P) filter
B B B Cycle [Backend: ... (B)] filter
U U U Toggle [Dedupe: Logical / PerBackend (U)]
O O O Toggle [Order: Kind->Bk / Bk->Kind (O)]
G G G Request consent (or open OS Settings) for the active tab’s permission domain
K K K Switch directly to the OS Recording Permissions & Consent modal
ArrowUp ArrowUp ArrowUp / ArrowDown ArrowDown ArrowDown Navigate candidate rows
Space Space Space Toggle candidate [x] selection
Enter Enter Enter Stage all checked candidates (or cursor row if none checked) and close modal
Escape Escape Escape Cancel and close modal (CloseModal)
Section titled “OS Recording Permissions & Consent Modal ()”
Shortcut Action
P P P Toggle PermissionPolicy (AutoRequest ↔\leftrightarrow CheckOnly)
O O O Toggle [x] Open OS Settings on Denial (O)
C C C Re-check all OS permission states (RefreshPermissions)
R R R / Enter Enter Enter Request all permissions required by staged sources (RequestRequiredPermissions)
1 1 1 / 2 2 2 / 3 3 3 Trigger per-domain Ask / Probe / Open Settings for Microphone (1), SystemAudio (2), or ScreenRecording (3)
Escape Escape Escape / K K K Close permissions modal (ClosePermissionsModal)
Q Q Q Quit cspa-tui-demo