Skip to content

fix(xremap): use globalRemap for code editors instead of terminalClipboardRemap - #2017

Merged
shunkakinoki merged 1 commit into
mainfrom
fix/xremap-code-editor-clipboard
Jul 7, 2026
Merged

fix(xremap): use globalRemap for code editors instead of terminalClipboardRemap#2017
shunkakinoki merged 1 commit into
mainfrom
fix/xremap-code-editor-clipboard

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Code editors (Cursor/VS Code) were using terminalClipboardRemap, which remapped Ctrl+C -> Ctrl+Shift+C and Framework+C/V -> Ctrl+Shift+C/V
  • This broke copy/paste since code editors use Ctrl+C/V natively (the Ctrl+Shift+C/V convention is only for terminal emulators)
  • Switched code editors to globalRemap so Framework+C/V correctly becomes Ctrl+C/V and bare Ctrl+C/V passes through unmodified

Test plan

  • Rebuild NixOS config (sudo nixos-rebuild switch --flake .)
  • Verify Framework+C/V works for copy/paste in Cursor/VS Code
  • Verify Ctrl+C/V still works in Cursor/VS Code
  • Verify Framework+C/V still maps to Ctrl+Shift+C/V in Ghostty

Summary by cubic

Fixes copy/paste in Cursor and VS Code by switching code editors from terminalClipboardRemap to globalRemap in xremap.

Framework+C/V now maps to Ctrl+C/V and bare Ctrl+C/V passes through; terminal emulators keep their Ctrl+Shift+C/V behavior.

Written for commit cef9f8f. Summary will update on new commits.

Review in cubic

…boardRemap

terminalClipboardRemap remapped Ctrl+C -> Ctrl+Shift+C and
Framework+C/V -> Ctrl+Shift+C/V in Cursor/VS Code. This broke
copy/paste since code editors use Ctrl+C/V natively (not the
terminal Ctrl+Shift+C/V convention). The integrated terminal
handles its own clipboard shortcuts internally.

Switch code editors to globalRemap so Framework+C/V correctly
becomes Ctrl+C/V and bare Ctrl+C/V passes through unmodified.
@indent-zero

indent-zero Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor
PR Summary

Fixes broken copy/paste in Cursor/VS Code by switching the xremap keymap entry for code editors from terminalClipboardRemap (which forced Ctrl+C -> Ctrl+Shift+C and Framework+C/V -> Ctrl+Shift+C/V) to plain globalRemap, so Framework+C/V now yields Ctrl+C/V and bare Ctrl+C/V passes through unmodified. The integrated VS Code terminal continues to handle its own SIGINT-vs-copy behavior internally, and other blocks (Ghostty, Slack, Global) are unaffected.

  • Changed remap on the "Framework Command (Code Editors)" keymap block from terminalClipboardRemap to globalRemap in home-manager/modules/xremap/default.nix.
  • Updated the comment on that block to describe the new standard Ctrl+C/V behavior and note that the integrated terminal manages its own clipboard shortcuts.

Issues

1 potential issue found:

  • The Code Editors keymap block now uses globalRemap, which is identical to the trailing Global fallback block — for codeEditorAppIds this entry is functionally redundant. Consider either removing it or leaving a comment noting it's kept as a hook for future editor-specific tweaks. → Autofix

CI Checks

Waiting for CI checks...


⚡ Autofix All Issues

@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@shunkakinoki
shunkakinoki merged commit 1efc3e4 into main Jul 7, 2026
3 checks passed
@shunkakinoki
shunkakinoki deleted the fix/xremap-code-editor-clipboard branch July 7, 2026 13:52
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7e7ee9ae-a571-406d-a465-4347add3031e

📥 Commits

Reviewing files that changed from the base of the PR and between d3b0367 and cef9f8f.

📒 Files selected for processing (1)
  • home-manager/modules/xremap/default.nix

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Updated copy and paste behavior in code editors to use the standard shortcuts, improving consistency with typical desktop apps.
    • Adjusted the related note to match the new behavior.

Walkthrough

Changes the xremap keymap configuration for the "Framework Command (Code Editors)" entry (Cursor/VS Code), switching the remap target from terminalClipboardRemap to globalRemap, converting clipboard behavior from terminal-style Ctrl+Shift+C/V to standard Ctrl+C/V, with an updated comment.

Changes

Xremap Keymap Update

Layer / File(s) Summary
Code editor clipboard remap
home-manager/modules/xremap/default.nix
Switches the remap target for Cursor/VS Code from terminalClipboardRemap to globalRemap, changing clipboard shortcuts to standard Ctrl+C/V, with the comment updated to match.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Poem

A hop, a key, a tiny swap,
Ctrl+C now beats terminal-drop,
No more Shift to clip my prose,
Just globalRemap, and off it goes! 🐇✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/xremap-code-editor-clipboard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the xremap configuration for code editors (Cursor/VS Code) in home-manager/modules/xremap/default.nix. It changes the remap behavior from terminalClipboardRemap to globalRemap to allow standard Ctrl+C/V shortcuts for copy and paste, noting that the integrated terminal manages its own clipboard shortcuts. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

name = "Framework Command (Code Editors)";
application.only = codeEditorAppIds;
remap = terminalClipboardRemap;
remap = globalRemap;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Redundant with the Global fallback: globalRemap here produces the exact same output as the unfiltered Framework Command (Global) block at line 139, so this entry no longer changes behavior for Cursor/VS Code — the Global block would catch them anyway. Not a bug (the fix is correct), but the block currently only serves as documentation of intent. Consider either dropping it or adding a comment that it's intentionally kept as a hook for future editor-specific tweaks.

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.

1 participant