From f8351cd27f00fca15e5b5c8b0d646cef04dc27dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Aug 2026 17:38:59 +0000 Subject: [PATCH 1/2] Initial plan From 065012ae512dff881ecc0b594fea1beaf4c99b42 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 3 Aug 2026 17:43:44 +0000 Subject: [PATCH 2/2] Enable keyboard activation (Enter/Space) for segmented voice/dictation cells Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com> --- .../voiceInputModeActionViewItem.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputModeActionViewItem.ts b/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputModeActionViewItem.ts index 44bbc94c0d2da..6dd2830547fb4 100644 --- a/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputModeActionViewItem.ts +++ b/src/vs/workbench/contrib/chat/browser/voiceInputMode/voiceInputModeActionViewItem.ts @@ -390,6 +390,7 @@ export class VoiceInputModeActionViewItem extends BaseActionViewItem { dom.EventHelper.stop(e, true); this._onClickDictation(); })); + this._registerActivationKeys(this._dictationCell, () => this._onClickDictation()); this._register(addMicButtonContextMenuListener( this._dictationCell, () => getDictationContextMenuActions(this.commandService, this.configurationService, this.keybindingService, DICTATION_TOGGLE_COMMAND_ID), @@ -419,6 +420,7 @@ export class VoiceInputModeActionViewItem extends BaseActionViewItem { dom.EventHelper.stop(e, true); this._onClickVoicePowerToggle(); })); + this._registerActivationKeys(this._voiceCell, () => this._onClickVoicePowerToggle()); this._register(addMicButtonContextMenuListener( this._voiceCell, () => getVoiceModeContextMenuActions(this.commandService, this.configurationService, this.keybindingService, VOICE_START_COMMAND_ID), @@ -467,6 +469,7 @@ export class VoiceInputModeActionViewItem extends BaseActionViewItem { } this._onClickListen(); })); + this._registerActivationKeys(this._listenCell, () => this._onClickListen()); // Dictation activity: driven directly by the built-in on-device speech-to-text // service so the mic reliably fills while a dictation session is recording or @@ -694,6 +697,23 @@ export class VoiceInputModeActionViewItem extends BaseActionViewItem { } } + /** + * Activate a segmented cell from the keyboard. The cells live inside a toolbar's + * `ActionBar`, whose key handler runs the (no-op) placeholder action on Enter/Space + * and calls `preventDefault`/`stopPropagation`, which would otherwise swallow the + * native button activation. Handle Enter/Space here and stop the event before it + * bubbles to the ActionBar so the focused cell's own gesture runs. + */ + private _registerActivationKeys(cell: HTMLElement, handler: () => void): void { + this._register(dom.addStandardDisposableListener(cell, dom.EventType.KEY_DOWN, e => { + if (e.equals(KeyCode.Enter) || e.equals(KeyCode.Space)) { + e.preventDefault(); + e.stopPropagation(); + handler(); + } + })); + } + private _onClickDictation(): void { this.voiceInputModeService.setSelectedMode('dictation');