-
-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Programmatically sending input from the client #620
Comments
You can access the javascript Terminal object via |
Thanks for the quick reply. My issue is not how to access the Terminal object; that seems to work fine - the problem is that using term.write() displays the text on the terminal UI, but never sends it to the server. For example, in the screenshot below, I first sent the "select version()" command using the Javascript console. That never gets sent to the server. If I then type the same command into the terminal window, it works fine and I get the version info I expect. |
There isn't an api from ttyd or xterm that can do it, but you can simulate keyboard dom events to xterm's textarea, it should work. |
example code to send
|
Yes, that works. Thanks! |
Hi
How can I programmatically send input from the client? Doing something like:
term.writeln('ls -al');
will write the text to the terminal, but it doesn't send it to the server (even when hitting return afterwards).
Thanks!
The text was updated successfully, but these errors were encountered: