Skip to content
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

Terminal input is not working #123

Open
andrei-zamfirescu opened this issue Feb 28, 2018 · 7 comments
Open

Terminal input is not working #123

andrei-zamfirescu opened this issue Feb 28, 2018 · 7 comments

Comments

@andrei-zamfirescu
Copy link

Hello,

I have implemented your terminal in my angular 5 application but I have issues getting the input work. In the documentation I have found nothing related to this and I think I'm missing something here.

Here is the code I'm using:

interface Terminal {
    dom(parm: any): any;
    write(parm: any): any;
    callHandler(parm: any,parm1: any): any;
    toString(parm: any);
}
declare var Terminal: {
    new (value?: any): Terminal;
}

.......

term: any = new Terminal({columns: 100, rows: 300});

    ngOnInit() {
        this.containers[0].tabindex = 0;
        this.term.dom(this.containers[0]);
        this.term.write("Waiting for input: ");
        console.log(this.term.toString('ansi'));
    }

I need to get terminal input for creating a post request to backend. Terminal buffer is sent back to app by socket.

Here is a screenshot from the application:

terminal screen

Thank you!
Andrei.

@Gottox
Copy link
Owner

Gottox commented Feb 28, 2018

Does this help?

this.term.on('data', console.log)

@andrei-zamfirescu
Copy link
Author

I guess this should log any input from the terminal? but still my keystrokes are not caught by t.js . I guess I'm still missing something here.

@Gottox
Copy link
Owner

Gottox commented Feb 28, 2018

Can you provide a test harnis where this issue can be reproduced?

@andrei-zamfirescu
Copy link
Author

andrei-zamfirescu commented Feb 28, 2018

I have a virtual machine with team viewer installed where you can "play with it" . Please let me know if you are not able to.

I really appreciate!
Andrei.

@andrei-zamfirescu
Copy link
Author

Hi Enno, have you managed to take a look?

@Gottox
Copy link
Owner

Gottox commented Mar 2, 2018

Sorry, I may help you later, currently busy.

Please provide a usecase I can check with my own tools on my box to understand your issue. (e.g. https://jsfiddle.net/) I won't login into remote boxes with public credentials.

@andrei-zamfirescu
Copy link
Author

Hi Enno, i have sent you an email with some details. Hope you don't mind.

Andrei.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants