 
     client_keydown: (ev) =>
         #console.log("client_keydown")
+        @allow_resize = true
 
         if @_ignore
             # no matter what cancel ignore if the user starts typing, since we absolutely must not loose anything they type.

        @element.find("a").tooltip(delay:{ show: 500, hide: 100 })

        @element.find("a[href=\"#increase-font\"]").click () =>
            @_increase_font_size()
            return false

        @element.find("a[href=\"#decrease-font\"]").click () =>
            @_decrease_font_size()
            return false

        @element.find("a[href=\"#refresh\"]").click () =>
            @session?.reconnect()
            return false

        @element.find("a[href=\"#paste\"]").click () =>
            id = uuid()
            s = "<h2><i class='fa project-file-icon fa-terminal'></i> Terminal Copy and Paste</h2>Copy and paste in terminals works as usual: to copy, highlight text then press ctrl+c (or command+c); press ctrl+v (or command+v) to paste. <br><br><span class='lighten'>NOTE: When no text is highlighted, ctrl+c sends the usual interrupt signal.</span><br><hr>You can copy the terminal history from here:<br><br><textarea readonly style='font-family: monospace;cursor: auto;width: 97%' id='#{id}' rows=10></textarea>"
            bootbox.alert(s)

                @render(data)

            if @_needs_resize
                @resize(true)

        @session.on 'reconnecting', () =>
            #console.log('terminal: reconnecting')
