Update engine.js

I think your variable names were wrong...
Merge pull request #2 from hughrawlinson/patch-1

Fix keycode error
fix typo 'for'
Merge pull request #3 from harry-wood/patch-1

fix typo 'for'