Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add screencastMode.keyboardOptions.showKeybindings #191686

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/vs/workbench/browser/actions/developerActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class InspectContextKeysAction extends Action2 {

interface IScreencastKeyboardOptions {
readonly showKeys?: boolean;
readonly showKeybindings?: boolean;
readonly showCommands?: boolean;
readonly showCommandGroups?: boolean;
readonly showSingleEditorCursorMoves?: boolean;
Expand Down Expand Up @@ -315,7 +316,7 @@ class ToggleScreencastModeAction extends Action2 {
append(keyboardMarker, $('span.title', {}, `${commandAndGroupLabel} `));
}

if (options.showKeys ?? true) {
if ((options.showKeys ?? true) || (command && (options.showKeybindings ?? true))) {
// Fix label for arrow keys
keyLabel = keyLabel?.replace('UpArrow', '↑')
?.replace('DownArrow', '↓')
Expand Down Expand Up @@ -435,6 +436,11 @@ configurationRegistry.registerConfiguration({
default: true,
description: localize('screencastMode.keyboardOptions.showKeys', "Show raw keys.")
},
'showKeybindings': {
type: 'boolean',
default: true,
description: localize('screencastMode.keyboardOptions.showKeybindings', "Show keyboard shortcuts.")
},
'showCommands': {
type: 'boolean',
default: true,
Expand All @@ -453,6 +459,7 @@ configurationRegistry.registerConfiguration({
},
default: {
'showKeys': true,
'showKeybindings': true,
'showCommands': true,
'showCommandGroups': false,
'showSingleEditorCursorMoves': true
Expand Down