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

cursor style not working for terminado's demo: echo -e "\e[2 q" #1730

Closed
hyperpallium opened this issue Oct 6, 2018 · 3 comments
Closed
Labels
type/question A question on how to use the library

Comments

@hyperpallium
Copy link

hyperpallium commented Oct 6, 2018

I want to stop the cursor blinking.

Inspecting xtermjs source, it does seem to implement DECSCUSR \e[# q (# = [0-6], e.g. echo -e "\e[2 q" is a steady block) in InputHandler.ts, but it has no effect in the single.py demo.
It starts with a blinking solid block, and none of the choices have any effect.

Oh, and I see where suggested (BTW typo in the eg, missing space, should be echo -e "\e[5 q"), then implemented.

How to make echo -e "\e[2 q" work? (equivalent to \033[2 q, or \x1b[2 q), to stop the cursor blinking?
I wouldn't think it's because of terminado, but maybe it is? Maybe they use xtermjs before this, [from >1 year ago?

using latest (mobile) broswer: android firefox 62.0.3

@hyperpallium hyperpallium changed the title cursor style not working from terminado demo e.g. echo -e "\e[2 q" cursor style not working from terminado demo e.g. echo -e "\e[2 q" Oct 6, 2018
@hyperpallium hyperpallium changed the title cursor style not working from terminado demo e.g. echo -e "\e[2 q" cursor style not working for terminado's demo: echo -e "\e[2 q" Oct 6, 2018
@Tyriar
Copy link
Member

Tyriar commented Oct 6, 2018

Works for me on my macbook, must be terminado or your environment filtering it out? Also on mac you need to change \e to \x1b, maybe that's the problem?

Also, there is an API you can use which is the standard way for the terminal to set this:

term.setOption('cursorBlink', false);

@Tyriar Tyriar closed this as completed Oct 6, 2018
@Tyriar Tyriar added the type/question A question on how to use the library label Oct 6, 2018
@hyperpallium
Copy link
Author

@Tyriar Thanks, looks like it's terminado. It works in my normal terminal - that would have the same environment, wouldn't it? I had tried all variants (\e, \x1b, \033).

Unfortunately, the API call also didn't work. I tried three different ways to access term, using terminado's demo as an example.

I also noticed that control keys don't work, which is a showstopper for my usages.

There are a few code layers here, and looks it would require careful study to get on top of it. It's a shame it doesn't "just work", but it is a pretty amazing concept, to have a full terminal in a browser.

@Tyriar
Copy link
Member

Tyriar commented Oct 7, 2018

@hyperpallium I would expect it to act like attach (which the demo uses), but I know next to nothing about what terminado does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/question A question on how to use the library
Projects
None yet
Development

No branches or pull requests

2 participants