Skip to content

Notebooks: add Shift+Enter run shortcut for all cells #1527

Description

@madesroches

Context

#1522 / #1526 gave every cell type a Run control wired to Ctrl/Cmd+Enter (via SyntaxEditor's onRunShortcut prop, already used by every query-backed cell editor, now including markdown). There is no Shift+Enter binding anywhere today, at either the per-editor (SyntaxEditor) or notebook-wide (useNotebookKeyboardNav.ts) layer.

This was left as an open question in that plan rather than folded into the PR, since it's a scope decision that applies to every cell type, not just markdown.

Proposal

Add Shift+Enter as a run shortcut for all cells, matching Jupyter. Two possible scopes, from smallest to largest:

  1. Alias onlyShift+Enter triggers the same in-place run as Ctrl/Cmd+Enter does today. Small addition to SyntaxEditor.
  2. Full Jupyter parity ("run and advance") — in Jupyter, Shift+Enter runs the cell and moves focus/selection to the next cell (creating one if it's the last), while Ctrl+Enter runs in place. That "advance" behavior doesn't exist anywhere in this codebase yet and would need new plumbing through useNotebookKeyboardNav.ts to move cell focus after a run completes.

Open question

Which scope is wanted — plain alias, or full run-and-advance semantics?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions