node-pty icon indicating copy to clipboard operation
node-pty copied to clipboard

Add support for conpty terminal handoff

Open ysc3839 opened this issue 1 year ago • 0 comments
trafficstars

This PR add a pty.handoff({ input, output, signal, ref, server, client }); function. To allow passing handoff handles and get a ITerminal interface.

This function need to use with https://github.com/ysc3839/node-terminal-handoff The usage is:

const pty = require('node-pty');
const handoff = require('terminal-handoff');

handoff.register(/*clsid=*/'{E12CFF52-A866-4C77-9A90-F570A7AA2C6B}', /*callback=*/function (input, output, signal, ref, server, client) {
  const handoffHandles = { input, output, signal, ref, server, client };
  const pty = pty.handoff(handoffHandles);
}, /*once=*/false);

Old PR is #716.

ysc3839 avatar Oct 22 '24 18:10 ysc3839