Fix kb events in both FF and Chrome.