 
     blur : () =>
         @is_focused = false
+        if IS_MOBILE
+            $(document).off('keydown', @mobile_keydown)
+
         @terminal.blur()
         $(@terminal.element).removeClass('salvus-console-focus').addClass('salvus-console-blur')
         editor = @terminal.editor


    focus : () =>
        @is_focused = true
        if not IS_MOBILE
            @terminal.focus()
        $(@terminal.element).addClass('salvus-console-focus').removeClass('salvus-console-blur')
        editor = @terminal.editor
        if editor?

                if changeObj.next?
                    handle_mobile_change(ed, changeObj.next)
            editor.on('change', handle_mobile_change)

            @mobile_keydown = (ev) =>
                if ev.keyCode == 8
                    @terminal.keyDown(ev)

            # Buttons
            @element.find(".salvus-console-up").click () ->
