             @session?.write_data(input_line.val())
             input_line.val('')
 
-        input_line.on 'keyup', (e) =>
+        input_line.on 'keydown', (e) =>
             if e.which == 13
                 e.preventDefault()
                 submit_line()

focused_console = undefined
client_keydown = (ev) ->
    focused_console?.client_keydown(ev)


class Console extends EventEmitter
    constructor: (opts={}) ->

        redux.getActions('file_use').mark_file(@project_id, @path, 'edit')

    client_keydown: (ev) =>
        #console.log("client_keydown")
        @mark_file_use()
        if ev.ctrlKey and ev.shiftKey
            switch ev.keyCode
