     #     console.log r
     #   ,0
 
-  _writingKeyDown: (e) ->
+  onKeyDown: (e) ->
     if e.keyCode is 13
       txt = @$writing.text()
       e.preventDefault()

    #   for url in urls
    #     length -= url.length
    #     length += 10
    @$length.text "#{length}/62"

  _setFocus: -> @$writing.focus()

  _validateAudiPart: (a) ->
    # if a[0] isnt "~"
    #   return false
    if a.indexOf("/") isnt -1

      audi = @state.audi    
    audi = @addCC audi
    MessageActions.sendMessage @$writing.text().trim(),audi
    @$writing.text('')
    @setState length:0
    @set()
    @typing false

  onKeyUp: (e) ->
    if not window.urb.util.isURL @$writing.text()
      @setState lengthy: (@$writing.text().length > 62)
    # r = window.getSelection().getRangeAt(0).cloneRange()
    # @$writing.text @$writing.text()
    # setTimeout => 
