     key = String.fromCharCode(char).toLowerCase()
   else 
     key = @keycodes[char]
-  
-  # e.preventDefault()
-  # e.stopPropagation()
+
+  unless @allowBubbling.indexOf key > 0  
+    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
# 


# list of our event names
eventnames = [ 
  "keyup",
  "keydown",
  "keypress"
]


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

#
#
Keyboard::keys = {}

#
#

  for k, v of @keys
    @pressed.push k if v
  
  return


#
#
Keyboard::capture = () ->
