Added support for cross-browser keypress listener.