 {Layer} = require "./Layer"
 {Events} = require "./Events"
 
-Events.OnEnterKey  = "OnEnterKey"
-Events.OnBackSpaceKey  = "OnBackSpaceKey"
+Events.EnterKey  = "EnterKey"
+Events.BackSpaceKey  = "BackSpaceKey"
 
 class exports.InputLayer extends Layer
 	constructor: (options={}) ->

	@isInArray: (value, array) ->
		return array.indexOf(value) > -1

	OnEnterKey: (cb) -> @on(Events.OnEnterKey, cb)
	OnBackSpaceKey: (cb) -> @on(Events.OnBackSpaceKey, cb)


			# If enter key is pressed
			if e.which is 13
				@emit(Events.EnterKey, event)

			# If backspace key
			if e.which is 8
				@emit(Events.BackSpaceKey, event)

	@define "value",
		get: -> @input.value
