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 quickly clear serial session screen? #530

Closed
darkhandz opened this issue Feb 18, 2022 · 10 comments
Closed

how to quickly clear serial session screen? #530

darkhandz opened this issue Feb 18, 2022 · 10 comments
Labels
duplicate This issue or pull request already exists

Comments

@darkhandz
Copy link

darkhandz commented Feb 18, 2022

I notice that SSH/cmd session use cls/clear to clear screen, but in the serial session, the context menu Clear Screen and Clear All does not work like SSH/cmd. I need to click Reconnect session and then click Clear scrollback to achieve the same effect.

image

@kingToolbox
Copy link
Owner

Please tell me what is the Data and System of your serial session, which are in the Session Settings dialog. Thank you.

@darkhandz
Copy link
Author

darkhandz commented Feb 18, 2022

They are text and linux, if I set system to none, the menu item clear all and clear screen will be disabled.
But the linux syntax highlight is really beautiful and distinguishable, whatever you say, I would never set it back to none 😆

@kingToolbox
Copy link
Owner

Sorry for the late reply.

There is no problem with text and system, I also don't want you to go back to barren none system. 😄 But in WindTerm, The Clear Screen needs the support of the remote system. After clicking the Clear Screen, WindTerm will send the text of clearScreen configured in the .system file.

Taking the linux system as an example, the clearScreen is defined as \u000c in the WindTerm_install_path/terminal/schemes/linux.system. So when you clear screen, WindTerm will send \u000c to the remote system. If the remote system understands this command, it will send the control sequence ED to WindTerm to clear the screen, and then WindTerm will clear the screen after receiving ED. In this way, the remote and local can be guaranteed to be exactly the same.

So, does your serial device support clear screen? You can try other terminals, if other terminals can clear the screen, please let me know and I will tell you how to solve it, thank you.

If you are connecting to dumb devices, they may not support clearing the screen. However, if you have a way to send \033[2J to WindTerm from the serial port, you can also clear the screen, just like executing echo -e "\033[2j" in the Linux system.

@darkhandz
Copy link
Author

I'm connecting to an embeded system using serial port, the system may not implement actions like clearScreen, when I try the clear function in other terminals (SecureCRT, MobaXterm, etc), they just clear all the text from screen.
I know WindTerm use a more consistant way to do this, but is there a way to handle this dumb situation?

@kingToolbox kingToolbox added the duplicate This issue or pull request already exists label Mar 21, 2022
@kingToolbox
Copy link
Owner

Duplicate of #335

In the new WindTerm_2.4.0_Prerelease_1, a new dumb system has been added. In addition to features such as highlighting and folding, the dumb system supports clearing the screen locally. So for some dumb devices, especially serial devices, if you need to clear the screen locally, please use dumb system instead of none system.

The dumb system also supports -> command prompt for the VxWorks system. Please download and use it, if you have any questions, please let me know, thank you.

BTW:
Please use dumb system with caution and only for the dumb devices. If the remote supports the clear screen command, using dumb system to clear the screen locally will cause the local display to be out of sync with the remote, which may cause various display errors.

@darkhandz
Copy link
Author

This update is really helpful to me and my dumb devices. 😁

And another out of topic question, why did you fold the menu into a single button in 2.4.0 pre1?

image

@kingToolbox
Copy link
Owner

Thanks for closing this issue. Sorry, I didn't see your question before.

The first is that the menu makes it impossible to use the shortcut keys Alt+1, Alt+2 and etc. to switch tabs, and these shortcut keys can be released by removing the menu.

Secondly, WindTerm has Command Palette, which should be more convenient to execute commands. So while removing the menu, I placed an Command Palette button in the menu bar to facilitate opening Command Palette at any time.

Finally, I also want to make room in the menubar to show more buttons, such as Layer, Focus Mode, X Server, Tunnels, Command Palette, Tools, Sync Input, SSH Agent, Volume, Bookmarks, Settings and more, and I always feel that a terminal's menu is rarely used and is an inefficient widget., of course this is just my intuition, I can't and won't add telemeter to get stats. I hate features like this.

But you're not the first person to ask this question, so I thought maybe I'm being a little aggressive. So I will restore the menu in the official version 2.4.0. But I will still look for opportunities to remove the menu in subsequent versions. 😄

You can also tell me your thoughts on the menu if you want, and I'm all ears.

@darkhandz
Copy link
Author

Thanks for the detail explanation. I agree with you that Menu is rarely to use, but I usually have to open the search bar from menu, because in my PC, neither the shortcut Alt + F nor the Ctrl + F will work. Could you please help to see?

@kingToolbox
Copy link
Owner

Sure. Do you have the same problem in other applications? And if you place the cursor in the Filter of the session Pane and press the Ctrl+F key, can the Search Bar pop up?

@darkhandz
Copy link
Author

Yes, set focus to the filter then press Ctrl+F can pop up the search bar.
Other application I've test such as Edge, Notepad++, Directory Opus, they can react to the Ctrl+F.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants