Fix keyPress handler in Firefox