Added better browser support for keyboard input.