Fixed keycode compatibility with webkit and IE.