Skip to content

Commit 120ddb6

Browse files
authored
Honor setting show only shortcut keys (microsoft#136251)
* Honor setting show only shortcut keys * Shortcut-only setting, check shortcut.commandId * Show keys when no title
1 parent 3d3e502 commit 120ddb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/browser/actions/developerActions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ class ToggleScreencastModeAction extends Action2 {
207207
const event = new StandardKeyboardEvent(e);
208208
const shortcut = keybindingService.softDispatch(event, event.target);
209209

210-
if (shortcut || !configurationService.getValue('screencastMode.onlyKeyboardShortcuts')) {
210+
if (shortcut?.commandId || !configurationService.getValue('screencastMode.onlyKeyboardShortcuts')) {
211211
if (
212212
event.ctrlKey || event.altKey || event.metaKey || event.shiftKey
213213
|| length > 20
@@ -243,7 +243,7 @@ class ToggleScreencastModeAction extends Action2 {
243243
append(keyboardMarker, $('span.title', {}, `${titleLabel} `));
244244
}
245245

246-
if (format === 'keys' || format === 'commandAndKeys' || format === 'commandWithGroupAndKeys') {
246+
if (!configurationService.getValue('screencastMode.onlyKeyboardShortcuts') || !titleLabel || shortcut?.commandId && (format === 'keys' || format === 'commandAndKeys' || format === 'commandWithGroupAndKeys')) {
247247
append(keyboardMarker, $('span.key', {}, keyLabel || ''));
248248
}
249249

0 commit comments

Comments
 (0)