-
Notifications
You must be signed in to change notification settings - Fork 88
Description
When I connect to my device behind my console server through the websockify proxy I first have to press the enter key in order to get a prompt to enter my username. I opened this issue on stackoverflow as well ( http://stackoverflow.com/questions/33436139/websockify-send-enter-key-through-web-socket-to-automatically-get-login-prompt/33456478#33456478 ). Some users might understand that they have to press the enter key first, but I feel like it's good to have this functionality in my application.
As one of the stackoverflow answers suggest, a simple modification can be made to the wstelnet.html page in order to send an enter key event ( new line ). I tested this function and it does send a new line ( the cursor moves 1 line down ), but the login prompt only appears after pressing enter myself.
function connected() {
$D('connectButton').disabled = false;
$D('connectButton').value = "Disconnect";
$D('connectButton').onclick = disconnect;
VT100.the_vt_.key_buf_.push("\n");
VT100.go_getch_();
}
How do I go further with this?