Add paste_selection keybinding.

Unbound by default, pastes primary selection.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2021-10-01 02:47:15 +00:00
parent 0b2d91786c
commit 705322dfff
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
4 changed files with 9 additions and 0 deletions

View File

@ -228,6 +228,10 @@ Default value: \fB<Ctrl><Shift>C\fR
Paste the current contents of the clipboard.
Default value: \fB<Ctrl><Shift>V\fR
.TP
.B paste_selection
Paste the current contents of the primary selection.
Default value: \fBUnbound\fR
.TP
.B toggle_scrollbar
Show/Hide the scrollbar.
Default value: \fB<Ctrl><Shift>S\fR

View File

@ -142,6 +142,7 @@ DEFAULTS = {
'close_term' : '<Shift><Control>w',
'copy' : '<Shift><Control>c',
'paste' : '<Shift><Control>v',
'paste_selection' : '',
'toggle_scrollbar' : '<Shift><Control>s',
'search' : '<Shift><Control>f',
'page_up' : '',

View File

@ -124,6 +124,7 @@ class PrefsEditor:
'close_term' : _('Close terminal'),
'copy' : _('Copy selected text'),
'paste' : _('Paste clipboard'),
'paste_selection' : _('Paste primary selection'),
'toggle_scrollbar' : _('Show/Hide the scrollbar'),
'search' : _('Search terminal scrollback'),
'page_up' : _('Scroll upwards one page'),

View File

@ -1810,6 +1810,9 @@ class Terminal(Gtk.VBox):
def key_paste(self):
self.paste_clipboard()
def key_paste_selection(self):
self.paste_clipboard(True)
def key_toggle_scrollbar(self):
self.do_scrollbar_toggle()