 
     $('.terminal').on 'focus', (e) =>
       @term.focus()
+
+    $('.terminal').on 'contextmenu', (e) =>
+      e.preventDefault()
+      @onContextMenu()
 
     @term.on 'data', (data) =>
       ipc.send 'terminal-data', data

utf8      = require 'utf8'
ipc       = require 'ipc'
Clipboard = require 'clipboard'

module.exports =
class TerminalView extends View

      if focus
        @term.focus()
        $('.terminal').focus()

  onContextMenu: () ->
    @contextMenu().popup()

  contextMenu: () ->
    Menu.buildFromTemplate([
      {
        label: 'Copy',
        accelerator: 'CmdOrCtrl+C',
        role: 'copy'
      },
      {
        label: 'Paste',
        accelerator: 'CmdOrCtrl+V',
        role: 'paste'
      }
    ])
