Skip to content

Keyboard: Command with X, C, V and A cuts, copies, pastes and selects all - #284

Open
jannyg wants to merge 2 commits into
OrchardLinux:mainfrom
jannyg:cmd-clipboard-keys
Open

jannyg wants to merge 2 commits into
OrchardLinux:mainfrom
jannyg:cmd-clipboard-keys

Conversation

@jannyg

@jannyg jannyg commented Dec 4, 2026

Copy link
Copy Markdown

Disclaimer: This is not my primary field. The change has been mostly vibe coded (with Claude) and tested only on my own device, an iPad Air 2 Cellular (j82) with an Apple Magic Keyboard.

What was missing

With a Bluetooth keyboard, Command (Super) + C/V did nothing, so copy and paste needed Ctrl, and in a terminal Ctrl+Shift. Upstream Omarchy has a "universal clipboard" on Hyprland: Super + X/C/V/A as cut, copy, paste and select all, in every app including the terminal. This brings it to labwc.

The change

  • desktop/shell/labwc-rc.xml: four bindings that send the keys through the virtual keyboard (/usr/libexec/omarchy-wtype):
    • Super+X / Super+A → Ctrl+X / Ctrl+A.
    • Super+C → Ctrl+C, but Ctrl+Insert in a terminal.
    • Super+V → Ctrl+V, but Ctrl+Shift+V in a terminal.
    • Terminals are matched with labwc's If / query identifier: foot, footclient, org.omarchy.terminal and com.mitchellh.ghostty.
  • Why Ctrl+Insert for copy: Ghostty does not take Ctrl+Shift+C from the virtual keyboard as copy. It reaches the shell as Ctrl+C and stops the running command. Ctrl+Insert copies in both Ghostty (its default) and foot (foot.ini).
  • ShortcutsModel.js + i18n/en/shell.json: Settings → Keyboard Shortcuts lists them under a new Editing group (Cut, Copy, Paste, Select All). An If binding is named by its then branch.
  • Migration 1796378339.sh: adds the bindings before </keyboard> in an existing ~/.config/labwc/rc.xml, unless it already binds one of those keys.
  • tests/test_universal_clipboard.py: the bindings, that a terminal never gets Ctrl+C, foot's keys, and the migration (an older rc.xml becomes the shipped one; a user's own binding is left alone; it runs once).

Tested

On the iPad Air 2 (j82) with an Apple Magic Keyboard, after running the migration on the original rc.xml:

  • Cmd+C in Firefox, then Cmd+V in Ghostty: pastes.
  • Ghostty select all (Ctrl+Shift+A), Cmd+C, then Cmd+V in Firefox: pastes.
  • sleep 30 in Ghostty and in foot, then Cmd+C: does not stop it.
  • Cmd+V in foot: pastes.

Other terminals (Alacritty, kitty) are not in the list, so they get the plain Ctrl keys. I could not test them.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SLbz23ZoimaemGQ2yfdfhR

jannyg and others added 2 commits December 4, 2026 10:06
… all

Upstream Omarchy's universal clipboard, for labwc: Super (Command on an
Apple keyboard) with X, C, V and A sends Ctrl with that key through the
virtual keyboard. In a terminal (foot, Ghostty) Command+C copies with
Ctrl+Insert and Command+V pastes with Ctrl+Shift+V. Ghostty does not
take Ctrl+Shift+C from the virtual keyboard as copy; it reaches the
shell as Ctrl+C and stops what runs.

Settings > Keyboard Shortcuts lists them under Editing. A migration adds
the bindings to an existing ~/.config/labwc/rc.xml unless it binds one of
those keys itself.

Tested on an iPad Air 2 (j82) with an Apple Magic Keyboard: copy and
paste between Firefox and Ghostty, and Command+C in Ghostty does not
stop a running command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SLbz23ZoimaemGQ2yfdfhR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SLbz23ZoimaemGQ2yfdfhR
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