pyxtermjs icon indicating copy to clipboard operation
pyxtermjs copied to clipboard

Pasting text inside terminal?

Open MightyZinger opened this issue 3 years ago • 1 comments

Is there any way to paste some text inside terminal from outside?

MightyZinger avatar Jul 30 '22 22:07 MightyZinger

That's a good question. It can be done with xterm.attachCustomKeyEventHandler. https://xtermjs.org/docs/api/terminal/classes/terminal/#attachcustomkeyeventhandler

I did it in some of my other projects -- you can do something almost identical for this project: https://github.com/cs01/termpair/blob/543d84af21e2892a8b6f177d1c397b88973b0e98/termpair/frontend_src/src/xtermUtils.tsx#L33.

PRs welcome!

cs01 avatar Jul 31 '22 05:07 cs01