Add a configurable F8 shortcut for voice conversations (#46071)

## What changed

- Bind `F8` to start or stop a voice conversation through the existing voice toggle handler, preserving its start guards and the composer draft.
- Expose `tui.keymap.chat.toggle_voice` in the configuration schema and keymap picker, with support for remapping, unbinding, and key chords.
- Let the default yield to existing `F8` bindings and overlapping chord prefixes, and validate explicit bindings against shortcut conflicts and reserved text input.
- Handle the shortcut only on key presses when no modal or popup is active.

## Testing

Add tests for default and custom bindings, conflicts, chord dispatch, live remapping and unbinding, draft preservation, start guards, and popup and key-event handling. Add a snapshot for the voice shortcut editor.

GitOrigin-RevId: e5e373e8eefa89bec4d5cbdca801616e312134b5
This commit is contained in:
Eric Traut authored and copyberry committed 2026-09-17 01:31:14 +00:00
1 parent 36b84c81ec
commit ce03f22af6
18 files changed
+279 -33

No files matched your search

+2
View File
@@ -123,6 +123,8 @@ pub struct TuiGlobalKeymap {
#[serde(deny_unknown_fields)]
#[schemars(deny_unknown_fields)]
pub struct TuiChatKeymap {
/// Start or stop a voice conversation.
pub toggle_voice: Option<KeybindingsSpec>,
/// Toggle the microphone in an active voice conversation.
pub toggle_voice_mute: Option<KeybindingsSpec>,
/// Interrupt the active turn.