     $linenosCode.html "Esc - #{metaKeyName}+s - Shift+#{metaKeyName}+s".replace /(.)/g, '$1<br>'
     $editorCode.html(content).attr('contentEditable', 'true').focus()
     $editor.addClass('editing')
-    $window.off 'keydown', disableSave
-    $window.on 'keydown', maybeSave
+    $body.off 'keydown', disableSave
+    $body.on 'keydown', maybeSave
 
   lock = (content, lines = []) ->
     content ?= getDomContent()

    $linenosCode.html lines.join '<br>'
    $editorCode.html(content).attr 'contentEditable', 'false'
    $editor.removeClass('editing')
    $window.on 'dblclick', startEditing
    $window.on 'keydown', maybeCancelEditing
    $window.on 'keydown', disableSave
    $window.off 'keydown', maybeSave

  list = () ->
    always = () ->

  startEditing = (evt) ->
    evt.preventDefault()
    edit currentContent
    window.getSelection()?.removeAllRanges()
    $body.off 'dblclick', startEditing
    false

  maybeCancelEditing = (evt) ->
