 
   events:
     keydown: (event) ->
-      endingComposition = @inputSummary.eventName is "compositionend"
-      @resetInputSummary() unless endingComposition
+      @resetInputSummary() unless @inputSummary.composing
 
       if keyName = @constructor.keyNames[event.keyCode]
         context = @keys

            break

        if context[keyName]?
          summary = {keyName, keyModifier}
          if endingComposition
            @extendInputSummary(summary)
          else
            @setInputSummary(summary)

          Trix.selectionChangeObserver.reset()
          context[keyName].call(this, event)



    compositionstart: (event) ->
      @mutationObserver.stop()
      @setInputSummary(composing: true, compositionStart: event.data)

    compositionupdate: (event) ->
      @setInputSummary(composing: true, compositionUpdate: event.data)

    compositionend: (event) ->
      @mutationObserver.start()
      composedString = event.data
      @setInputSummary(composing: true, compositionEnd: composedString)

      if composedString? and composedString isnt @inputSummary.compositionStart
        @delegate?.inputControllerWillPerformTyping()
        @responder?.insertString(composedString)
        @setInputSummary(textAdded: composedString, didDelete: @selectionIsExpanded())

    input: (event) ->
      event.stopPropagation()
