Make copy line up/down shortcuts editable#9008
Open
kallal79 wants to merge 2 commits intomarimo-team:mainfrom
Open
Make copy line up/down shortcuts editable#9008kallal79 wants to merge 2 commits intomarimo-team:mainfrom
kallal79 wants to merge 2 commits intomarimo-team:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
There was a problem hiding this comment.
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.copyLineDownas editable by removingeditable: falsefrom 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
HotkeyProvidervalues. - 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. |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Light2Dark
previously approved these changes
Apr 8, 2026
manzt
previously approved these changes
Apr 16, 2026
Light2Dark
approved these changes
Apr 17, 2026
Collaborator
|
@kallal79 , could you have a look at fixing the type errors? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.