fix tests in firefox as firefox fires on keypress not down

So basically this PR is a hack to tell browsers which type of event to fire.

It's hard to say how well this will be received by other browsers but as I don't have any locally to test on I'm going to issue a PR and let Travis do that work for me...