                 @render_task_list()
 
     init_search: () =>
-        ###
-        @element.find(".salvus-tasks-search").keydown (evt) =>
-            if evt.which == 13
-                @render_task_list()
-                return false
-            else if evt.which == 27 # escape
-                @element.find(".salvus-tasks-search").val("")
-                @render_task_list()
-                return false
-        ###
-
         @_last_search = misc.walltime()
         search_delay = 300  # do the search when user stops typing for this many ms
-        @element.find(".salvus-tasks-search").keyup () =>
+        search_box = @element.find(".salvus-tasks-search")
+        search_box.keyup (evt) =>
+            if evt.which == 27
+                search_box.val('').blur()
+                @render_task_list()
+                return
+            else if evt.which == 13
+                @edit_desc(@current_task)
+                return
             t = misc.walltime()
             if t - @_last_search >= search_delay
                 @_last_search = t

                        @_last_search = t
                        @render_task_list()
                setTimeout(f, search_delay)

        @element.find(".salvus-tasks-search-clear").click () =>
            e = @element.find(".salvus-tasks-search")

            current_task_list.toggle_current_task_done()
            return false
    else
        if (evt.which == 13 or evt.which == 73) and not current_task_list.readonly # return = edit selected
            current_task_list.edit_desc(current_task_list.current_task)
            return false

        else if evt.which == 40 or evt.which == 74    # down
            current_task_list.set_current_task_next()
            return false

        else if evt.which == 38 or evt.which == 75    # up
            current_task_list.set_current_task_prev()
            return false

