 
     kd.getSingleton('windowController').addLayer this
     @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) ->

kd = require 'kd'
KDCustomHTMLView = kd.CustomHTMLView
KDInputView = kd.InputView
KDListViewController = kd.ListViewController
nick = require 'app/util/nick'
FSHelper = require 'app/util/fs/fshelper'
IDEFileFinderItem = require './idefilefinderitem'
Encoder = require 'htmlencode'


module.exports = class IDEFileFinder extends KDCustomHTMLView

    @addSubView @input = input = new KDInputView
      type         : 'text'
      placeholder  : 'Type a file name to search'
      keydown      : _.bind @handleKeyDown, this

    input.on 'keyup', kd.utils.debounce 300, @bound 'handleKeyUp'
    input.on 'keyup', =>
