 		if template.open.curValue isnt true or template.hasData.curValue isnt true
 			return
 
-		if event.which in [38, 40]
+		if event.which in [keys.ARROW_UP, keys.ARROW_DOWN]
 			event.preventDefault()
 			event.stopPropagation()
 
-		if event.which in [13, 9]
+		if event.which in [keys.ENTER, keys.TAB]
 			template.open.set false
 
 			template.enterValue()
 
 			event.preventDefault()
 			event.stopPropagation()
+
+		if event.which is keys.ARROW_UP
+			template.up()
+		else if event.which is keys.ARROW_DOWN
+			template.down()
 
 	template.setTextFilter = _.debounce (value) ->
 		template.textFilter.set(value)
 	, template.textFilterDelay
 
 	template.onInputKeyup = (event) =>
-		if template.open.curValue is true and event.which is 27
+		if template.open.curValue is true and event.which is keys.ESC
 			template.open.set false
 			event.preventDefault()
 			event.stopPropagation()

getCursorPosition = (input) ->
	if not input? then return
	if input.selectionStart?

		if template.open.curValue isnt true
			return

		if event.which not in [keys.ARROW_UP, keys.ARROW_DOWN]
			Meteor.defer =>
				template.verifySelection()

