                     return false
                 else
                     return true
-
-            # If there is a hilighted suggestion, we want to catch enter
-            if @$('.suggestion_name_li_hl').length > 0
-                if event?.which is 13
-                    event.preventDefault()
-                    @handle_keypress()
-                    return true
-
-            # We are scrolling in history
-            if @history_displayed_id isnt 0 and event?
-                # We catch ctrl, shift, alt, 
-                if event.ctrlKey or event.shiftKey or event.altKey or event.which is 16 or event.which is 17 or event.which is 18 or event.which is 20 or event.which is 91 or event.which is 92 or event.type of @mouse_type_event
-                    return false
-
-            # Avoid arrows+home+end+page down+pageup
-            # if event? and (event.which is 24 or event.which is ..)
-            # 0 is for firefox...
-            if not event? or (event.which isnt 37 and event.which isnt 38 and event.which isnt 39 and event.which isnt 40 and event.which isnt 33 and event.which isnt 34 and event.which isnt 35 and event.which isnt 36 and event.which isnt 0)
-                @history_displayed_id = 0
-                @draft = @codemirror.getValue()
-
-            if event?.which isnt 9 # has to be before create_suggestion()
-                @cursor_for_auto_completion = @codemirror.getCursor()
-            # We just look at key up so we don't fire the call 3 times
-            if event?.type? and event.type isnt 'keyup' and event.which isnt 9 and event.type isnt 'mouseup'
-                return false
-            if event?.which is 16 # We don't do anything with Shift.
-                return false
-
-            # Tab is an exception, we let it pass (tab bring back suggestions) - What we want is to catch keydown
-            if @ignore_tab_keyup is true and event?.which is 9
-                if event.type is 'keyup'
-                    @ignore_tab_keyup = false
-                return true
-
-            @current_highlighted_suggestion = -1
-            @.$('.suggestion_name_list').empty()
 
             result =
                 status: null

                        query_after_cursor += query_lines[i] + '\n'
                    else
                        query_after_cursor += query_lines[i]
            @query_last_part = query_after_cursor

            # Initialize @current_element, which tracks what the user typed before they hit TAB (to auto-complete).
            # Tracking this helps us let the user loop over all the suggestions available for the fragment they typed (and go back to the fragment).
            @current_element = ''

            stack = @extract_data_from_query

                                    @move_cursor 1
                                    event.preventDefault()
                                return true
            return false

        get_next_char: =>
            cursor_end = @codemirror.getCursor()
