Skip to content

Fix Vim Ctrl-C copy shortcut#1672

Open
dicnunz wants to merge 1 commit intoBoostIO:masterfrom
dicnunz:fix-vim-copy-shortcut
Open

Fix Vim Ctrl-C copy shortcut#1672
dicnunz wants to merge 1 commit intoBoostIO:masterfrom
dicnunz:fix-vim-copy-shortcut

Conversation

@dicnunz
Copy link
Copy Markdown

@dicnunz dicnunz commented May 9, 2026

Fixes #773.

IssueHunt bounty: https://issuehunt.io/r/BoostIO/BoostNote-App/issues/773

Reproduction

The issue report describes Vim keymap mode on Windows/Linux where Ctrl-C exits Vim insert mode instead of copying the selected editor text to the clipboard. A maintainer pointed to the old Boostnote fix and suggested adding an extra CodeMirror key binding in the editor setup.

Changes

  • Adds a shared CodeMirror Ctrl-C extra key for Vim keymap mode.
  • Calls the browser copy command before returning CodeMirror.Pass, preserving the existing Vim key handling after the copy attempt.
  • Merges the default editor extra keys with per-editor config extra keys so the copy binding is not lost when editor configs provide their own extraKeys.

Verification

  • ./node_modules/.bin/eslint src/cloud/lib/editor/components/CodeMirrorEditor.tsx --ext .tsx
  • ./node_modules/.bin/tsc --noEmit
  • npm run lint
  • git diff --check

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't use ctrl-c to copy text in Vim binding mode

2 participants