how to implement ctrl+l for windows cmd?
Asked Answered
S

3

6

In linux terminal as I give ctrl+L signal, terminal screen clears. since I am new in windows programming and I found that cls command is used to clear screen. How can I make ctrl+L signal in case of windows cmd to clear screen.

Superfuse answered 28/9, 2014 at 12:25 Comment(1)
Rather than giving -1 .... one should also explain what is wrong and how to correct it.Superfuse
N
2

You should use the cls command as a key shortcut will be more difficult. There is something called AutoHotkey, you can try that and tell us if that helped you :)

Click here to go to their website: AutoHotkey

Nephritis answered 29/9, 2014 at 8:40 Comment(0)
J
6

For anyone still stumbling upon this post, as it comes up first in Google search:

With the new Windows Terminal, you can go under Settings -> Actions -> Add new -> Clear buffer and set the hotkey you want.

Joust answered 7/3, 2024 at 19:5 Comment(0)
N
2

You should use the cls command as a key shortcut will be more difficult. There is something called AutoHotkey, you can try that and tell us if that helped you :)

Click here to go to their website: AutoHotkey

Nephritis answered 29/9, 2014 at 8:40 Comment(0)
O
0

This scripts works for the CMD shell, with Autohotkey 2.0

#SingleInstance
#Requires Autohotkey v2.0
#HotIf WinActive("ahk_class ConsoleWindowClass")
^L::{
SendText("cls")
Send("{Enter}")
return
}
#HotIf
Ornithomancy answered 31/7, 2024 at 8:14 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.