cua icon indicating copy to clipboard operation
cua copied to clipboard

[Bug]: Cua Spaces macOS viewer fails to capture Command shortcuts for Linux/Omarchy Super bindings

Open Ayuilos opened this issue 2 months ago • 2 comments

Primary area

Other — Cua Spaces native macOS client / interactive desktop viewer.

Summary

When controlling an Omarchy/Hyprland Linux desktop from the native Cua Spaces Mac app, physical Command combinations that overlap shortcuts on the Mac are handled on the Mac or produce no guest response. This prevents using Command as the guest's Super modifier. Moving from the floating viewer to the main window and clicking the remote desktop did not resolve the problem.

Reproduction

  1. On a Mac, open Cua Spaces and connect to an Omarchy Linux desktop with its default Super bindings.
  2. Bring the main Cua Spaces window forward and click inside the live remote desktop.
  3. Use the physical Mac keyboard to try Command combinations that should invoke guest Super shortcuts.
  4. Observe that combinations also assigned on the Mac are intercepted by the host, or the expected guest action does not occur.
  5. Repeat in the floating/PiP viewer. The user reports the same problem there, and explicitly retried the focused main-window workaround without success.

The user describes this as affecting essentially all Command combinations that have a corresponding shortcut on the Mac. A recording and an exact per-chord physical-key test matrix are not available; this report does not claim that specific examples such as Command+Tab or Command+Space were individually instrumented.

For a controlled maintainer reproduction, the guest's verified SUPER+code:11 workspace-2 binding provides a useful Command+2 test.

Expected behavior

While the interactive remote desktop owns keyboard focus, supported Command chords should reach the Linux guest as Super chords instead of invoking host-app shortcuts.

For macOS system-reserved shortcuts, please expose/document the capture policy and any limitations. If explicit keyboard capture is needed, its active state and the shortcut to release capture should be clear.

Actual behavior

The guest does not respond to the affected physical Command shortcuts; the user reports that overlapping Mac shortcuts take priority. Clicking the stream in the main window did not fix this.

The cause is not established. We have not traced individual physical events through AppKit, the stream protocol, and the guest.

Environment

  • Cua Spaces native Mac app: 0.7.0, build 0.7.0.10.
  • Host: macOS 26.5.2, arm64.
  • Guest: Omarchy / Hyprland on Linux, running under QEMU/KVM on a separate Linux host.
  • Guest cua-spacesd: 0.5.3.
  • Guest keyboard configuration: kb_layout = us, no custom kb_options or modifier remapping observed.
  • Both main-window and floating/PiP interactive desktop viewers were tried.

Evidence

  • Direct CUA/MCP injection of super+2 successfully switched the guest workspace. The guest's Super binding itself works through that path.
  • Guest configuration inspection confirmed SUPER+code:11 switches to workspace 2.
  • Daemon logs showed an interactive live session using PersistentForeground delivery. This confirms the session mode, not delivery of the physical Command events.
  • No screenshot or physical-key event recording is attached.

Workaround and additional context

Direct MCP Super-key injection works, but is not a workaround for normal human keyboard use in the viewer.

Upstream was checked on 2026-10-04:

  • The official 0.7.0 release and automatic-update feed identify build 0.7.0.10 as the latest Mac app build.
  • Main was checked at 2751efcc421e6cf0964c5dc2ceb4d2359d367add. The comparison against the 0.7.0 release contained no changes under libs/spaces-app-swift.
  • LiveStreamView.swift already implements performKeyEquivalent, guarded by isInteractive and window?.firstResponder === self. The floating viewer uses a nonactivating panel. These are investigation pointers, not a confirmed diagnosis, especially because the main-window retry also failed.
  • Latest main was inspected, not rebuilt or runtime-tested locally.

Submission checks

  • [x] I searched for duplicate issues and active pull requests.
  • [x] This issue describes a single problem.
  • [x] I removed credentials, private data, sensitive screenshots, and vulnerability details from this public report.

Ayuilos avatar Oct 04 '26 15:10 Ayuilos

Thanks for the report, @Ayuilos. I've labelled it and assigned @injaneity to take a look.

f-trycua avatar Oct 06 '26 13:10 f-trycua

Thanks for the detailed report, @Ayuilos. #4848 makes the viewer claim Command chords before the app's own shortcuts while the stream has the keyboard (main window and floating viewer), so they reach the guest as Super. Control+Option (press and release) or a click outside the stream hands them back to the Mac; system-reserved shortcuts like ⌘Tab and ⌘Space stay on the Mac. Repro test: ViewerInputTests.commandChordReachesTheSpaceBeforeTheAppsShortcuts.

ddupont808 avatar Oct 07 '26 17:10 ddupont808