Avoid using already defined shortcuts in examples

This commit is contained in:
pagedown 2022-03-29 16:45:02 +08:00
parent 4ed2854791
commit aa83f42f2d
No known key found for this signature in database
GPG Key ID: E921CF18AC8FF6EB
2 changed files with 11 additions and 9 deletions

View File

@ -797,15 +797,15 @@ class Boss:
See :sc:`reset_terminal <reset_terminal>` for details. For example:: See :sc:`reset_terminal <reset_terminal>` for details. For example::
# Reset the terminal # Reset the terminal
map kitty_mod+f9 clear_terminal reset active map f1 clear_terminal reset active
# Clear the terminal screen by erasing all contents # Clear the terminal screen by erasing all contents
map kitty_mod+f10 clear_terminal clear active map f1 clear_terminal clear active
# Clear the terminal scrollback by erasing it # Clear the terminal scrollback by erasing it
map kitty_mod+f11 clear_terminal scrollback active map f1 clear_terminal scrollback active
# Scroll the contents of the screen into the scrollback # Scroll the contents of the screen into the scrollback
map kitty_mod+f12 clear_terminal scroll active map f1 clear_terminal scroll active
# Clear everything up to the line with the cursor # Clear everything up to the line with the cursor
map kitty_mod+f9 clear_terminal to_cursor active map f1 clear_terminal to_cursor active
''') ''')
def clear_terminal(self, action: str, only_active: bool) -> None: def clear_terminal(self, action: str, only_active: bool) -> None:
if only_active: if only_active:

View File

@ -3650,13 +3650,15 @@ map('Reset the terminal',
You can create shortcuts to clear/reset the terminal. For example:: You can create shortcuts to clear/reset the terminal. For example::
# Reset the terminal # Reset the terminal
map kitty_mod+f9 clear_terminal reset active map f1 clear_terminal reset active
# Clear the terminal screen by erasing all contents # Clear the terminal screen by erasing all contents
map kitty_mod+f10 clear_terminal clear active map f1 clear_terminal clear active
# Clear the terminal scrollback by erasing it # Clear the terminal scrollback by erasing it
map kitty_mod+f11 clear_terminal scrollback active map f1 clear_terminal scrollback active
# Scroll the contents of the screen into the scrollback # Scroll the contents of the screen into the scrollback
map kitty_mod+f12 clear_terminal scroll active map f1 clear_terminal scroll active
# Clear everything up to the line with the cursor
map f1 clear_terminal to_cursor active
If you want to operate on all windows instead of just the current one, use If you want to operate on all windows instead of just the current one, use
:italic:`all` instead of :italic:`active`. :italic:`all` instead of :italic:`active`.