Skip to content

feat: support OSC 52 clipboard writes - #8204

Open
aka-luan wants to merge 1 commit into
vercel:canaryfrom
aka-luan:fix/osc52-clipboard
Open

feat: support OSC 52 clipboard writes#8204
aka-luan wants to merge 1 commit into
vercel:canaryfrom
aka-luan:fix/osc52-clipboard

Conversation

@aka-luan

@aka-luan aka-luan commented Aug 1, 2026

Copy link
Copy Markdown

Closes #6153

Summary

  • handle OSC 52 system clipboard writes through the xterm.js parser API
  • decode UTF-8 clipboard data and write it through Electron host clipboard API
  • ignore clipboard reads, non-system selections, and malformed payloads
  • add focused unit coverage

Context

Herdr and other remote terminal tools use OSC 52 to transfer copied text to the attaching terminal. Hyper currently uses xterm.js 5.3.0 but does not register an OSC 52 handler. xterm.js added the parser and clipboard addon support in xtermjs/xterm.js#4220.

This integrates Hyper existing Electron clipboard API directly with the parser hook, without changing Herdr WSL clipboard routing or migrating Hyper existing xterm dependency set.

Testing

  • pnpm run test:unit (12 passed)
  • focused ESLint check (pass)
  • focused Prettier check (pass)

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.

Add support for OSC52

1 participant