   'click .editorKeyboard': (e, t) ->
     e.preventDefault()
     e.stopPropagation()
-    t.keyboard.set kb = e.target.getAttribute 'data-keyboard'
+    messageKeyboard.set @_id, kb = e.target.getAttribute 'data-keyboard'
     t.editor.setKeyboardHandler if kb == 'ace' then '' else 'ace/keyboard/' + kb
     $(e.target).parent().dropdown 'toggle'
 

  'click .foldButton': (e, t) ->
    e.preventDefault()
    e.stopPropagation()
    t.folded.set not t.folded.get()

  'click .rawButton': (e, t) ->
    e.preventDefault()
    e.stopPropagation()
    t.raw.set not t.raw.get()

  'click .editButton': (e, t) ->
    e.preventDefault()

    @slider.setValue diffs.length-1
    #@slider.off 'change'
    @slider.on 'change', (e) =>
      messageHistory.set @data._id, diffs[e.newValue]
    messageHistory.set @data._id, diffs[diffs.length-1]

uploader = (template, button, input, callback) ->
  Template[template].events {
