diff --git a/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.ts b/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.ts index 2dcd24876fe5b..f06bc5a4193a0 100644 --- a/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.ts +++ b/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.ts @@ -340,7 +340,8 @@ registerAction2(class extends Action2 { keybinding: [{ when: ContextKeyExpr.and( IS_COMPOSITE_NOTEBOOK, - ContextKeyExpr.equals('activeEditor', 'workbench.editor.repl') + ContextKeyExpr.equals('activeEditor', 'workbench.editor.repl'), + NOTEBOOK_CELL_LIST_FOCUSED.negate() ), primary: KeyMod.CtrlCmd | KeyCode.Enter, weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT @@ -348,7 +349,8 @@ registerAction2(class extends Action2 { when: ContextKeyExpr.and( IS_COMPOSITE_NOTEBOOK, ContextKeyExpr.equals('activeEditor', 'workbench.editor.repl'), - ContextKeyExpr.equals('config.interactiveWindow.executeWithShiftEnter', true) + ContextKeyExpr.equals('config.interactiveWindow.executeWithShiftEnter', true), + NOTEBOOK_CELL_LIST_FOCUSED.negate() ), primary: KeyMod.Shift | KeyCode.Enter, weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT @@ -356,7 +358,8 @@ registerAction2(class extends Action2 { when: ContextKeyExpr.and( IS_COMPOSITE_NOTEBOOK, ContextKeyExpr.equals('activeEditor', 'workbench.editor.repl'), - ContextKeyExpr.equals('config.interactiveWindow.executeWithShiftEnter', false) + ContextKeyExpr.equals('config.interactiveWindow.executeWithShiftEnter', false), + NOTEBOOK_CELL_LIST_FOCUSED.negate() ), primary: KeyCode.Enter, weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT