WebSerial icon indicating copy to clipboard operation
WebSerial copied to clipboard

Sending Special Characters

Open belveder79 opened this issue 4 years ago • 5 comments

Hi, thx for this great work.

I purchased the Pro version and I wonder if there is any option to send special characters like ^C or so over the textbox. I'm using the webserial on an ESP32 to directly interface a PC over a serial port, giving me a login to the PC. Login and password prompt works as expected, so do all commands that terminate. If I do a simple ping X.X.X.X , it obviously does never terminate automatically, so I wonder if I could send ^C eg. over the textbox.

Is this possible and if yes, how? Can this be integrated somehow if it is not there already? thx

belveder79 avatar Oct 06 '21 10:10 belveder79

I see you havn't gotten a response as yet, you could work around the Ping problem, by using a switch with Ping. Use "Ping IP Address -n 10" to send 10 requests, then terminate automatically.

dannyz2 avatar Nov 17 '21 09:11 dannyz2

thx - yeah, limiting the number makes total sense in this case.

The major question I had was if sending special characters would work somehow... if that was possible, the tool was way more versatile...

belveder79 avatar Nov 17 '21 11:11 belveder79

Currently, it's limited to what HTML supports in a text input. What's your application btw? I'm not aware of those commands.

ayushsharma82 avatar Nov 17 '21 12:11 ayushsharma82

well, I'm connecting to a PC over the webserial of an ESP32, in order to execute some debugging commands if necessary. Therefore it would be good to be able to send some special characters as well, as e.g. with the ping command to terminate it... that's just one example...

belveder79 avatar Nov 17 '21 13:11 belveder79

@belveder79 Did some quick research, seems like it's not possible to type special characters in HTML webpages. You'll have to build some custom logic on top of WebSerial to interpret incoming messages and apply special characters.

ayushsharma82 avatar Nov 17 '21 16:11 ayushsharma82