fixed key code bug with different browser / operation systems