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

How to check if current terminal supports TUI? #821

Open
t1m013y opened this issue Feb 27, 2024 · 2 comments
Open

How to check if current terminal supports TUI? #821

t1m013y opened this issue Feb 27, 2024 · 2 comments

Comments

@t1m013y
Copy link

t1m013y commented Feb 27, 2024

I compiled one of examples. It works on Windows 11 and 10. But in custom terminal program I can't use mouse and on windows 7 it prints random set of characters. How to check if current terminal supports TUI (to use standard console interface if not)? I want to make maximum cross-platform app so it is important to me.

@t1m013y t1m013y changed the title How to check if terminal supports TUI How to check if current terminal supports TUI Feb 27, 2024
@t1m013y t1m013y changed the title How to check if current terminal supports TUI How to check if current terminal supports TUI? Feb 27, 2024
@ArthurSonzogni
Copy link
Owner

Thanks for your patience!

FTXUI detects this for you, but you can also override the decision:
https://github.com/ArthurSonzogni/FTXUI/blob/main/include/ftxui/screen/terminal.hpp#L17-L24

Microsoft terminals are known to be problematic.

What terminal are you using?

@t1m013y
Copy link
Author

t1m013y commented May 1, 2024

For example, it works in windows 10 and 11 terminal but it don't works at all in windows 7 terminal or in Console Portable

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