pyxtermjs
pyxtermjs copied to clipboard
Pasting text inside terminal?
Is there any way to paste some text inside terminal from outside?
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!