Skip to content

wstelnet.html requires the user to press enter to get login prompt #25

Open

Description

@beeelze

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions