Browse Source

middle click to paste (fixes #613)

Eugene Pankov 6 years ago
parent
commit
38cfb3f036
1 changed files with 6 additions and 0 deletions
  1. 6 0
      terminus-terminal/src/components/baseTerminalTab.component.ts

+ 6 - 0
terminus-terminal/src/components/baseTerminalTab.component.ts

@@ -199,6 +199,12 @@ export class BaseTerminalTabComponent extends BaseTabComponent implements OnInit
 
             this.frontend.mouseEvent$.subscribe(async event => {
                 if (event.type === 'mousedown') {
+                    if (event.which === 2) {
+                        this.paste()
+                        event.preventDefault()
+                        event.stopPropagation()
+                        return
+                    }
                     if (event.which === 3) {
                         if (this.config.store.terminal.rightClick === 'menu') {
                             this.hostApp.popupContextMenu(await this.buildContextMenu())