mabe02 / lanterna

Java library for creating text-based GUIs
GNU Lesser General Public License v3.0
2.3k stars 243 forks source link

Support for the new Windows Terminal? #612

Open gonza2323 opened 2 months ago

gonza2323 commented 2 months ago

Hi,

I understand that the library doesn't support the old cmd.exe terminal. But can it work with the new Windows Terminal? From what I could gather, it supports ANSI escape sequences, and I can run lanterna apps just fine with it when using WSL.

avl42 commented 2 months ago

If you run your application in WSL, then it is essentially a Linux application running under some specific "Linux-flavour".

On Sat, Sep 7, 2024 at 6:38 AM gonza2323 @.***> wrote:

Hi,

I understand that the library doesn't support the old cmd.exe terminal. But can it work with the new Windows Terminal? From what I could gather, it supports ANSI escape sequences, and I run lanterna apps just fine with it when using WSL.

— Reply to this email directly, view it on GitHub https://github.com/mabe02/lanterna/issues/612, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIDBMQG7T2LG5I74N5RVW3ZVJ7MFAVCNFSM6AAAAABNZVUN4WVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUYTCNBWGM4TEMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mabe02 commented 2 months ago

The ANSI escape codes are one thing, but we still rely on stty to some extent for modifying things like echo and special characters. Not sure if there's a way to do that with the window terminal without using native library integration.

gonza2323 commented 2 months ago

Ah ok, I understand, thank you, The current native integration is for the old console, right?

mabe02 commented 1 month ago

Yes, it's using JNI and calls the standard system calls (GetConsoleMode, SetConsoleMode, etc).