mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-29 18:46:59 +00:00
xterm paints to a canvas, so its selection is not a DOM selection: the Edit menu's Copy and the right-click Copy both call webContents.copy(), find nothing, and copy nothing. On macOS the menu also swallows the Cmd+C accelerator before the renderer sees it. That left Ctrl+C as the only key that did anything, and xterm correctly forwards it to the PTY as SIGINT. Mirror the selection into xterm's hidden helper textarea (the mechanism xterm already uses for Linux middle-click paste) so the OS sees a real selection and every platform copy path works, and add explicit chords on top: Cmd+C/Cmd+V on macOS, Ctrl+Shift+C/V elsewhere, matching VS Code. Plain Ctrl+C copies only when text is selected -- the behavior Windows Terminal and Tabby ship -- and stays SIGINT otherwise, so interrupting a process never breaks. Reads go through a new hermes:readClipboard IPC handler for the same reason writes already do: the renderer's clipboard API throws whenever the document isn't focused. |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||