Skip to content

Make copy line up/down shortcuts editable#9008

Open
kallal79 wants to merge 2 commits intomarimo-team:mainfrom
kallal79:fix/issue-7056-editable-copy-line-shortcuts-pr
Open

Make copy line up/down shortcuts editable#9008
kallal79 wants to merge 2 commits intomarimo-team:mainfrom
kallal79:fix/issue-7056-editable-copy-line-shortcuts-pr

Conversation

@kallal79
Copy link
Copy Markdown

@kallal79 kallal79 commented Apr 3, 2026

This updates the CodeMirror keymap override path so both commands use marimo hotkey config instead of fixed defaults, and adds a regression test to confirm custom overrides are applied.

Copilot AI review requested due to automatic review settings April 3, 2026 11:18
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Apr 16, 2026 8:01pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes CodeMirror’s “copy line up/down” shortcuts configurable through marimo’s hotkey system (instead of being fixed), and adds a regression test to ensure overrides are respected.

Changes:

  • Marked cell.copyLineUp / cell.copyLineDown as editable by removing editable: false from default hotkey definitions.
  • Updated CodeMirror keymap overrides to (1) remove the built-in bindings for copy line up/down and (2) re-add them using HotkeyProvider values.
  • Added a unit test confirming custom hotkey overrides are applied for these commands.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
frontend/src/core/hotkeys/hotkeys.ts Allows “copy line up/down” to be user-editable by default.
frontend/src/core/codemirror/keymaps/keymaps.ts Ensures CodeMirror uses marimo hotkey config for copy line up/down by overriding and rebinding these commands.
frontend/src/core/codemirror/keymaps/__tests__/keymaps.test.ts Adds regression coverage verifying the override keymap uses provider-defined keys for the copy line commands.

@kallal79
Copy link
Copy Markdown
Author

kallal79 commented Apr 3, 2026

I have read the CLA Document and I hereby sign the CLA

@Light2Dark Light2Dark added the enhancement New feature or request label Apr 8, 2026
Light2Dark
Light2Dark previously approved these changes Apr 8, 2026
manzt
manzt previously approved these changes Apr 16, 2026
@Light2Dark
Copy link
Copy Markdown
Collaborator

@kallal79 , could you have a look at fixing the type errors?

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants