LeedsJs/jackdaw — pull request #38 by sfoster (2012-03-01 03:12:28+00:00)
Title: Component.create fix, keyboardControls refactoring to create keysDown (map) and keysDownMask (bitmask)

I wanted the keyboardControls to produce a bitmask of keys pressed, based on our current UP/RIGHT/LEFT/DOWN directional controls, to simplify the which-direction-am-i-facing logic, and mostly just for the hell of it.
I didn't see the keysDown array getting used so I've replaced that with the dictionary with truthy values for each key name. I also put the String.fromCharCode value in there, which probably isn't correct for the keyCode event property, but you get the idea; for spacebar, for J to jump etc. we need to capture all.

And, with the nice multiple-keypress handling (thanks Abe) we can have cool chorded easter eggs and unlock codes.