From 4b69bf47aa7951266cf44a7262bcb7972b1b5a74 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 17 Nov 2008 10:42:34 +0000 Subject: [PATCH] Add keyboard shortcuts for reset and reset/clear. Closes LP#287634 --- doc/terminator.1 | 6 ++++++ doc/terminator_config.5 | 8 ++++++++ terminatorlib/config.py | 2 ++ terminatorlib/terminatorterm.py | 6 ++++++ 4 files changed, 22 insertions(+) diff --git a/doc/terminator.1 b/doc/terminator.1 index 60e6bc40..347df313 100644 --- a/doc/terminator.1 +++ b/doc/terminator.1 @@ -133,6 +133,12 @@ Restore font size to original setting. .TP .B F11 Toggle fullscreen +.TP +.B Ctrl+Shift+R +Reset terminal state +.TP +.B Ctrl+Shift+G +Reset terminal state and clear window .SH "Drag and Drop" The layout can be modified by moving terminals with Drag and Drop. To start dragging a terminal, hold down \fBCtrl\fP, click and hold the \fBright\fP mouse button. diff --git a/doc/terminator_config.5 b/doc/terminator_config.5 index b1956bc8..7dd17b3c 100644 --- a/doc/terminator_config.5 +++ b/doc/terminator_config.5 @@ -304,5 +304,13 @@ Default value: \fBPage_Up\fR .B full_screen Toggle the window to a fullscreen window. Default value: \fBF11\fR +.TP +.B reset +Reset the terminal state. +Default value: \fBR\fR +.TP +.B reset_clear +Reset the terminal state and clear the terminal window. +Default value: \fBG\fR .SH "SEE ALSO" .BR gnome\-terminal(1) diff --git a/terminatorlib/config.py b/terminatorlib/config.py index 18f06e0d..7d369819 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -133,6 +133,8 @@ Defaults = { 'next_tab' : 'Page_Down', 'prev_tab' : 'Page_Up', 'full_screen' : 'F11', + 'reset' : 'R', + 'reset_clear' : 'G', } } diff --git a/terminatorlib/terminatorterm.py b/terminatorlib/terminatorterm.py index ee55fc40..5b389f7c 100755 --- a/terminatorlib/terminatorterm.py +++ b/terminatorlib/terminatorterm.py @@ -770,6 +770,12 @@ text/plain def key_prev_tab(self): self.terminator.previous_tab (self) + + def key_reset(self): + self._vte.reset (True, False) + + def key_reset_clear(self): + self._vte.reset (True, True) # End key events def zoom_orig (self):