       console.log "terminal.resize error #{e}"
   
   sendThrottled : _.throttle ->
-    @terminal.write @bufferedKeyStrokes
+    @sendCount++
+    @terminal.write @bufferedKeyStrokes,@sendCount
     console.log "#{@bufferedKeyStrokes.length} @bufferedKeyStrokes sent at - interval 500msec",new Date if @terminal.log
     @bufferedKeyStrokes = []
   ,500

        console.log error
      else
        window.T = terminal
        @terminal = terminal
        @welcomeUser terminal.isNew
        callback? terminal.totalSessions

    @dmp = new diff_match_patch()
    @lastScreen = ""
    @bufferedKeyStrokes = []
    @sendCount = 0
    
    shellView.registerListener KDEventTypes:'AdvancedSettingsFunction', listener:@, callback:(pubInst, {functionName})=>
      switch functionName
