Skip to content

Commit

Permalink
Merge pull request #520 from rkitover/primary-selection-keybind
Browse files Browse the repository at this point in the history
Add paste_selection keybinding.
  • Loading branch information
mattrose authored Oct 1, 2021
2 parents 0b2d917 + 705322d commit 65c630b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/terminator_config.5
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions terminatorlib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
'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' : '',
Expand Down
1 change: 1 addition & 0 deletions terminatorlib/prefseditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
3 changes: 3 additions & 0 deletions terminatorlib/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1810,6 +1810,9 @@ def key_copy(self):
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()

Expand Down

0 comments on commit 65c630b

Please sign in to comment.