     @on 'ReceivedClickElsewhere', @bound 'destroy'
 
 
-  handleKeyDown: (e) ->
-
-    code = e.which or e.keyCode
-    key  = keycode code
-
-    switch key
-      when 'esc'   then @destroy()
-      when 'enter' then @handleEnterKey()
-      when 'up'    then @handleNavigation 'up'
-      when 'down'  then @handleNavigation 'down'
-
-
-  search: (text) ->
+  search: _.debounce (text) ->
 
     return @clearSearch()  if text is ''
 

keycode              = require 'keycode'
_                    = require 'lodash'


module.exports = class IDEFileFinder extends KDCustomHTMLView

  constructor: (options = {}, data) ->


      type         : 'text'
      placeholder  : 'Type a file name to search'
      keydown      : _.bind @handleKeyDown, this
      keyup        : _.bind @handleKeyUp, this

    @addSubView new KDCustomHTMLView cssClass: 'icon'
    @addSubView @content = new KDCustomHTMLView
