             fullpath = entry.data('name')
             filename = misc.path_split(fullpath).tail
             if match(filename, entry.hasClass('project-directory-link'))
-                if first and event.keyCode == 13 # enter -- select first match (if any)
+                if first and event?.keyCode == 13 # enter -- select first match (if any)
                     entry.click()
                     first = false
                 if v != ""

            else
                if v != ""
                    entry.addClass(exclude); entry.removeClass(include)
        if first and event.keyCode == 13
            # No matches at all, and user pressed enter -- maybe they want to create a file?
            @display_tab("project-new-file")
            @new_file_tab_input.val(search_box.val())

        if not IS_MOBILE
            @_file_search_box.focus()

    update_file_search: (event) =>
        search_box = @_file_search_box
        include = 'project-listing-search-include'
        exclude = 'project-listing-search-exclude'
