Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change shortcut for iTerm2 clear lines?

Tags:

macos

zsh

iterm2

Ctrl + l is the default shortcut for clear lines in iTerm2, I want to change it to Cmd + l, but can't find this action:

enter image description here

BTW I'm using zsh.

like image 330
laike9m Avatar asked Oct 31 '25 15:10

laike9m


1 Answers

Ctrl-L or "form feed" is part of the ANSI/VT100 protocol (http://wiki.bash-hackers.org/scripting/terminalcodes), it's not specific to iTerm2.

Your best best is to use Applescript to send Ctrl-L to the terminal when Cmd-L is pressed.

like image 71
Arne Brasseur Avatar answered Nov 03 '25 10:11

Arne Brasseur