fix keyPressed, add generic key events, tick diff
defensive on tickdiff
Merge pull request #2 from JPMoresmau/master

Fix and additions. I've largely abandoned this, at least for the time being. If someone else is interested in maintaining this I'd be happy to hand it over.