 
 module.exports = class LiterallyCanvas
 
-  constructor: (@containerEl, opts) ->
-    @_unsubscribeEvents = bindEvents(this, @containerEl, opts.keyboardShortcuts)
-
+  constructor: (containerEl, opts) ->
     @opts = opts
 
     @config =

    # that all layers are repainted.
    @setZoom(@scale)

    util.matchElementSize(
      @containerEl, [@backgroundCanvas, @canvas], @backingScale, =>
        @keepPanInImageBounds()
        @repaintAllLayers()
    )

    if @watermarkImage
      @watermarkImage.onload = => @repaintLayer('background')

    @loadSnapshot(opts.snapshot) if opts.snapshot

  _teardown: ->
    @tool.willBecomeInactive(this)
    @tool = null
    @_unsubscribeEvents()

  trigger: (name, data) ->
    @canvas.dispatchEvent(new CustomEvent(name, detail: data))


    @backingScale = util.getBackingScale(@ctx)

    @backgroundShapes = opts.backgroundShapes || []
    @_shapesInProgress = []
    @shapes = []
    @undoStack = []
    @redoStack = []
