- List of Events
- Core
- Crafty
- Crafty Core
- Crafty.bind()
- Crafty.c()
- Crafty.clone()
- Crafty.defineField()
- Crafty.e()
- Crafty.extend()
- Crafty.frame()
- Crafty.getVersion()
- Crafty.init()
- Crafty.isPaused()
- Crafty.one()
- Crafty.pause()
- Crafty.s()
- Crafty.settings
- Crafty.stage
- Crafty.stop()
- Crafty.support
- Crafty.trigger()
- Crafty.unbind()
- Crafty.uniqueBind()
- 2D
- Animation
- Assets
- Audio
- Controls
- Debug
- Events
- Game Loop
- Graphics
- Input
- Misc
- Model
- Scenes
- Stage
- Utilities
Crafty.keydown
Check which keys (referred by Crafty.keys
key codes) are currently down.
Example
// is "Shift" currently pressed?
var shiftDown = !!Crafty.keydown[Crafty.keys.SHIFT];