Keyboard Shortcut to clear terminal #13168

Closed
opened 2026-01-31 03:35:28 +00:00 by claunia · 4 comments
Owner

Originally created by @kevinjosethomas on GitHub (Mar 24, 2021).

Description of the new feature/enhancement

I clear my terminal after almost every command as I prefer keeping things clean, without having to scroll up; I think quite a few other people use the clear command a lot too. Always typing in clear or cls is a hassle.

Proposed technical implementation details (optional)

Add a keyboard shortcut that automatically clears the open terminal using cls or clear. I was wondering if it was possible to have a built-in keyboard shortcut that automatically clears the terminal, something that is easy to access but not already used by another function.

Originally created by @kevinjosethomas on GitHub (Mar 24, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> I clear my terminal after almost every command as I prefer keeping things clean, without having to scroll up; I think quite a few other people use the ``clear`` command a lot too. Always typing in clear or cls is a hassle. # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. --> Add a keyboard shortcut that automatically clears the open terminal using ``cls`` or ``clear``. I was wondering if it was possible to have a built-in keyboard shortcut that automatically clears the terminal, something that is easy to access but not already used by another function.
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 03:35:28 +00:00
Author
Owner

@237dmitry commented on GitHub (Mar 24, 2021):

A good idea. But do not remove scroll-up Ctrl+L

@237dmitry commented on GitHub (Mar 24, 2021): A good idea. But do not remove scroll-up `Ctrl+L`
Author
Owner

@firstaidguyheru commented on GitHub (Mar 24, 2021):

You damn near read my mind.

@firstaidguyheru commented on GitHub (Mar 24, 2021): You damn near read my mind.
Author
Owner

@zadjii-msft commented on GitHub (Mar 24, 2021):

Thanks for the suggestion! #1802 has a lot more details on why this is currently hard to do.

You might be able to get away with

        { "command": { "action": "sendInput", "input": "clear\r" }, "keys":"ctrl+k", "name": "clear terminal" },

which will manually send "clearenter" to the terminal. Adjust as needed for your preferred shell.

/dup #1882

@zadjii-msft commented on GitHub (Mar 24, 2021): Thanks for the suggestion! #1802 has a lot more details on why this is currently hard to do. You might be able to get away with ```json { "command": { "action": "sendInput", "input": "clear\r" }, "keys":"ctrl+k", "name": "clear terminal" }, ``` which will manually send "clear<kbd>enter</kbd>" to the terminal. Adjust as needed for your preferred shell. /dup #1882
Author
Owner

@ghost commented on GitHub (Mar 24, 2021):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Mar 24, 2021): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13168