Remote: copy from the phone to this device's clipboard
CI / test (pull_request) Successful in 1m22s

- Web UI: Ctrl+C, Ctrl+X, Ctrl+Shift+C (Cmd+C on Mac) also put what they copied, text or PNG, on this device's clipboard; Copy, Copy Selection and Copy Clipboard buttons
- chandra-remote: GET /api/clipboard/data, with the same authorization as the upload
- Compositor: clipboard-get-fd has the clipboard's owner write into a pipe, refused while locked; input-copy presses Ctrl+Shift+C in terminals, Ctrl+C elsewhere
- Pending clipboard transfers keep the main loop awake

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Opus 5.5 committed 2026-11-30 18:26:53 -08:00
1 parent c5dbe028e6
commit 589d167f79
11 files changed
+552 -19

No files matched your search

+11
View File
@@ -1113,6 +1113,7 @@ pub fn ChandraCompositor::has_timed_work(self : ChandraCompositor) -> Bool {
self.shot_toast is Some(_) ||
self.auth_animating() ||
self.thumbs_pending() ||
self.server.pending_transfers() > 0 ||
self.overview_animating() ||
self.shell.animating() ||
self.shell.face_busy() ||
@@ -2252,6 +2253,16 @@ pub fn ChandraCompositor::remote_paste(
false
}
///| Press the focused window's copy keys: Ctrl+C, or Ctrl+Shift+C in terminals, where Ctrl+C
/// interrupts. False where there is nothing to copy from: a dialog or popup of the shell's own.
pub fn ChandraCompositor::remote_copy(self : ChandraCompositor) -> Bool {
if self.locked || self.auth is Some(_) || self.shell.popup_open() || self.kbd_win is None {
return false
}
self.remote_key_tap(46U, if self.terminal_focused() { 5U } else { 4U }, @sys.monotonic_ms().to_uint())
true
}
///| Whether the window with keyboard focus looks like a terminal, by its app id.
fn ChandraCompositor::terminal_focused(self : ChandraCompositor) -> Bool {
match self.kbd_win {