-
I have been working on a project where i need to send the command through a websocket connection which i initially set up using some variable which will store the value entered and then when the user press enter it will check if the user entered value is clear or exit and if its not it will sent the data over the websocket connection. But I recently saw about attach addon and i implemented that and found that on each key i press the data is being sent over the websocket connection. I checked with the attach addons code and found the same being mentioned there as So i want to know if there is a way i can make it work like when i press enter only the command should be sent over the websocket connection. It would be really helpful if there is a way i can customize the behavior when i press Enter. should i make changes to the addons code to make it work or is it possible to do it from my code? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You're referring to |
Beta Was this translation helpful? Give feedback.
You're referring to
ICANON
aka canonical or cooked mode, you need a pty to do on the "client side" where xterm.js is which isn't there because it's in a web browser. You can see microsoft/vscode#135644 to understand the problem more. I don't think there's a way to do this currently, there are WIP projects like https://github.com/jerch/browser-fakepty but it's not a trivial thing to implement.