Change:
<!-- Do Not Delete This! featurerequesttemplate --<!-- Please read our Rules of Conduct: --<!-- Please search existing issues to avoid creating duplicates. --<!-- Describe the feature you'd like. --Currently, for copying a command like on the "Keyboard Shortcuts" page, there're two options: Copies Command ID Copies But really, quite often, we just want to copy , and there's no option for that. Therefore, I'm making a feature request for it.
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like: <!-- score: 0.526 --- <!-- score: 0.46 --- <!-- score: 0.447 --<!-- potentialduplicatescomment --
Hey I see this is assigned to you, I opened a PR to address this. It is my 1st PR so any constructive feedback would be appreciated ;-)
I hope this works for you? :smile_cat:
Sorry for the late response, but I don't know how to test this though.
Planning to look at this PR in July milestone.
Thanks for the PR - I did some small fine tunings after. !
To verify: Open Keyboard Shortcuts editor Right click on an entry and make sure you have an action to copy the command title Make sure this action works as expected

Discussion:
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IKeybindingService, IUserFriendlyKeybinding } from 'vs/platform/keybinding/common/keybinding'; import { DefineKeybindingWidget, KeybindingsSearchWidget } from 'vs/workbench/contrib/preferences/browser/keybindingWidgets'; <del> import { CONTEXT_KEYBINDING_FOCUS, CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDINGS_SEARCH_FOCUS, KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS, KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE, KEYBINDINGS_EDITOR_COMMAND_DEFINE, KEYBINDINGS_EDITOR_COMMAND_REMOVE, KEYBINDINGS_EDITOR_COMMAND_RESET, KEYBINDINGS_EDITOR_COMMAND_COPY, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND, KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN, KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR, KEYBINDINGS_EDITOR_COMMAND_ADD } from 'vs/workbench/contrib/preferences/common/preferences'; </del> <ins> import { CONTEXT_KEYBINDING_FOCUS, CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDINGS_SEARCH_FOCUS, KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS, KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE, KEYBINDINGS_EDITOR_COMMAND_DEFINE, KEYBINDINGS_EDITOR_COMMAND_REMOVE, KEYBINDINGS_EDITOR_COMMAND_RESET, KEYBINDINGS_EDITOR_COMMAND_COPY, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND, KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN, KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR, KEYBINDINGS_EDITOR_COMMAND_ADD, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_LABEL } from 'vs/workbench/contrib/preferences/common/preferences'; </ins> import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IKeybindingEditingService } from 'vs/workbench/services/keybinding/common/keybindingEditing'; import { IListContextMenuEvent, IListEvent } from 'vs/base/browser/ui/list/list';

await this.clipboardService.writeText(keybinding.keybindingItem.command); } <ins> async copyKeybindingCommandLabel(keybinding: IKeybindingItemEntry): Promise<void> { this.selectEntry(keybinding); this.reportKeybindingAction(KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_LABEL, keybinding.keybindingItem.command, keybinding.keybindingItem.keybinding); await this.clipboardService.writeText(keybinding.keybindingItem.commandLabel); } </ins> focusSearch(): void { this.searchWidget.focus(); }

getActions: () => [ this.createCopyAction(keybindingItemEntry), this.createCopyCommandAction(keybindingItemEntry), <ins> this.createCopyCommandLabelAction(keybindingItemEntry), </ins> new Separator(), ...(keybindingItemEntry.keybindingItem.keybinding ? [this.createDefineKeybindingAction(keybindingItemEntry), this.createAddKeybindingAction(keybindingItemEntry)]

}; } <ins> private createCopyCommandLabelAction(keybinding: IKeybindingItemEntry): IAction { return <IAction>{ label: localize('copyCommandLabelLabel', "Copy Command Label"), enabled: true, id: KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_LABEL, run: () => this.copyKeybindingCommandLabel(keybinding) }; } </ins> private reportFilteringUsed(filter: string): void { if (filter) { const data = {

export const KEYBINDINGS_EDITOR_COMMAND_RESET = 'keybindings.editor.resetKeybinding'; export const KEYBINDINGS_EDITOR_COMMAND_COPY = 'keybindings.editor.copyKeybindingEntry'; export const KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND = 'keybindings.editor.copyCommandKeybindingEntry'; <ins> export const KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_LABEL = 'keybindings.editor.copyCommandKeybindingLabel'; </ins> export const KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR = 'keybindings.editor.showConflicts'; export const KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS = 'keybindings.editor.focusKeybindings'; export const KEYBINDINGS_EDITOR_SHOW_DEFAULT_KEYBINDINGS = 'keybindings.editor.showDefaultKeybindings';