   for k, v of @keys
     @pressed.push k if v
   
-  return 
+  return
+
+
 #
 #
 Keyboard::capture = () ->

    key = String.fromCharCode(char).toLowerCase()
  else 
    key = @keycodes[char]
  
  # e.preventDefault()
  # e.stopPropagation()
  
  
  @keys[key] = pressed;

# essentially a fork of playground.js's keyboard, but adapted for use with Aghs
# ( and rewritten in coffeescript )
# ->  https://github.com/rezoner/playground/blob/master/src/Keyboard.js
 




# Keyboard
#
#
Keyboard = (@options = {}) ->
  
  # state
  @pressed = []
  @keys = {}
  @disabled = @options.disabled or false
  
  # add each keycode name to the keys object
  for k, v of @keycodes
    @keys[v] = false
  
  # bindings
  @handler = @handler.bind(@)
  
  # begin listening
  @capture()
  return @

#
# Defined on the prototype as an optimization, so that the JIT compiler needs to only create 1 internal class
Keyboard::keys = {}
Keyboard::pressed = []


#
# Keys that shouldn't be default prevented, and prevented from propagating
Keyboard::allowBubbling = [
  "ctrl"    
]

#
#
