 	@isInArray: (value, array) ->
 		return array.indexOf(value) > -1
 
-	OnEnterKey: (cb) -> @on(Events.OnEnterKey, cb)
-	OnBackSpaceKey: (cb) -> @on(Events.OnBackSpaceKey, cb)
+	onEnterKey: (cb) -> @on(Events.EnterKey, cb)
+	onBackSpaceKey: (cb) -> @on(Events.BackSpaceKey, cb)

{Layer} = require "./Layer"
{Events} = require "./Events"

Events.OnEnterKey  = "OnEnterKey"
Events.OnBackSpaceKey  = "OnBackSpaceKey"

class exports.InputLayer extends Layer
	constructor: (options={}) ->


			# 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
